Skip to content

Commit

Permalink
Fixed: Does not throw exception if plist is not valid. It will return…
Browse files Browse the repository at this point in the history
… nil instead.
  • Loading branch information
Martin Carlberg committed Mar 1, 2016
1 parent b59b025 commit ec55bdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Foundation/CPKeyedUnarchiver.j
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ var CPArrayClass = Ni
*/
- (id)decodeObjectForKey:(CPString)aKey
{
var object = _plistObject.valueForKey(aKey),
var object = _plistObject && _plistObject.valueForKey(aKey),
objectClass = (object != nil) && object.isa;

if (objectClass === CPDictionaryClass || objectClass === CPMutableDictionaryClass)
Expand Down

0 comments on commit ec55bdd

Please sign in to comment.