Skip to content

Commit

Permalink
Safe
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirek Rusin authored and Mirek Rusin committed Mar 8, 2011
1 parent c9d7b12 commit df96971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CoreJSON/CoreJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ inline CFTypeRef JSONCreateWithString(CFAllocatorRef allocator, CFStringRef stri
}

inline CFTypeRef __JSONCreateObject(__JSONRef json) {
return CFRetain(*json->elements);
return (json && json->elements && json->elementsIndex && *json->elements) ? CFRetain(*json->elements) : NULL;
}

#pragma Generator
Expand Down

0 comments on commit df96971

Please sign in to comment.