Cocoa docs state that if unarchiver:didDecodeObject: returns nil, the original object should be used, no replacement should be done.

This commit is contained in:
Aparajita Fishman
2011-03-23 21:45:53 -04:00
committed by Randall Luecke
parent d54db1d52b
commit ea25d22628
+1 -1
View File
@@ -505,7 +505,7 @@ var _CPKeyedUnarchiverDecodeObjectAtIndex = function(self, anIndex)
if (self._delegateSelectors & _CPKeyedUnarchiverDidDecodeObjectSelector)
processedObject = [self._delegate unarchiver:self didDecodeObject:object];
if (processedObject != object)
if (processedObject && processedObject != object)
{
if (self._delegateSelectors & _CPKeyedUnarchiverWillReplaceObjectWithObjectSelector)
[self._delegate unarchiver:self willReplaceObject:object withObject:processedObject];