diff --git a/ChangeLog b/ChangeLog index 5a2dcd4c7..76e7d014f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-26 Fred Kiefer + + * Source/NSIndexSet.m: Check before each usage of _other if it is + actually set. + 2004-03-24 Adam Fedor * Resources/GNUmakefile: Add Languages/Hungarian. diff --git a/Source/NSIndexSet.m b/Source/NSIndexSet.m index 86f26f456..83298f384 100644 --- a/Source/NSIndexSet.m +++ b/Source/NSIndexSet.m @@ -460,7 +460,7 @@ static unsigned posForIndex(GSIArray array, unsigned index) } else { - unsigned count = GSIArrayCount(_other); + unsigned count = _other ? GSIArrayCount(_other) : 0; if (count > 0) { @@ -580,7 +580,7 @@ static unsigned posForIndex(GSIArray array, unsigned index) - (void) addIndexes: (NSIndexSet*)aSet { - unsigned count = GSIArrayCount(_other); + unsigned count = _other ? GSIArrayCount(_other) : 0; if (count > 0) { @@ -701,7 +701,7 @@ static unsigned posForIndex(GSIArray array, unsigned index) - (void) removeIndexes: (NSIndexSet*)aSet { - unsigned count = GSIArrayCount(_other); + unsigned count = _other ? GSIArrayCount(_other) : 0; if (count > 0) {