mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2025-03-01 08:17:29 +00:00
Issue #301 fix, check for nil before adding to _allObjects in NSNib.m
This commit is contained in:
parent
9bb5bd88d0
commit
53ea1dc325
@ -72,13 +72,16 @@ NSString *NSNibTopLevelObjects=@"NSNibTopLevelObjects";
|
||||
}
|
||||
|
||||
-unarchiver:(NSKeyedUnarchiver *)unarchiver didDecodeObject:object {
|
||||
[_allObjects addObject:object];
|
||||
if(object!=nil)
|
||||
[_allObjects addObject:object];
|
||||
return object;
|
||||
}
|
||||
|
||||
-(void)unarchiver:(NSKeyedUnarchiver *)unarchiver willReplaceObject:object withObject:replacement {
|
||||
NSUInteger index=[_allObjects indexOfObjectIdenticalTo:object];
|
||||
[_allObjects replaceObjectAtIndex:index withObject:replacement];
|
||||
if(object!=nil && replacement!=nil){
|
||||
NSUInteger index=[_allObjects indexOfObjectIdenticalTo:object];
|
||||
[_allObjects replaceObjectAtIndex:index withObject:replacement];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSDictionary *)externalNameTable {
|
||||
|
Loading…
x
Reference in New Issue
Block a user