Skip to content

Commit

Permalink
Checking nil for value (for safety)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed Aug 14, 2012
1 parent 250b3a4 commit 0c66026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/YAJLDocument.m
Expand Up @@ -97,7 +97,7 @@ - (void)parser:(YAJLParser *)parser didAdd:(id)value {
break;
case YAJLDecoderCurrentTypeDict:
NSParameterAssert(key_);
[dict_ setObject:value forKey:key_];
if (value) [dict_ setObject:value forKey:key_];
if ([delegate_ respondsToSelector:@selector(document:didSetObject:forKey:inDictionary:)])
[delegate_ document:self didSetObject:value forKey:key_ inDictionary:dict_];
[self _popKey];
Expand Down

0 comments on commit 0c66026

Please sign in to comment.