Fixed: array replaceObjectsInRange:withObjectsFromArray: always failed with a "'null' is not an object' error.

This was caused by the new range checks in f8404c7a97.
This commit is contained in:
Alexander Ljungberg
2011-09-07 16:18:08 +01:00
parent 78b9c5b576
commit 7f31be7cb1
+1 -1
View File
@@ -259,7 +259,7 @@ var concat = Array.prototype.concat,
if (aRange.location < 0 || CPMaxRange(aRange) > self.length)
[CPException raise:CPRangeException reason:_cmd + " aRange out of bounds"];
if (otherRange.location < 0 || CPMaxRange(otherRange) > anArray.length)
if (otherRange && (otherRange.location < 0 || CPMaxRange(otherRange) > anArray.length))
[CPException raise:CPRangeException reason:_cmd + " otherRange out of bounds"];
if (otherRange && (otherRange.location !== 0 || otherRange.length !== [anArray count]))