diff --git a/atom/browser/mac/dict_util.mm b/atom/browser/mac/dict_util.mm index 04837ebbae50..188909548eb3 100644 --- a/atom/browser/mac/dict_util.mm +++ b/atom/browser/mac/dict_util.mm @@ -26,7 +26,7 @@ NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value) scoped_ptr NSDictionaryToDictionaryValue( NSDictionary* dict) { - if (!dict) + if (!dict || ![NSJSONSerialization isValidJSONObject:dict]) return nullptr; NSData* data = [NSJSONSerialization dataWithJSONObject:dict