Fix converting empty V8 dictionary.

This commit is contained in:
Cheng Zhao 2014-06-23 21:50:28 +08:00
parent 11e4111f25
commit 0349fdfd67

View file

@ -15,7 +15,7 @@ bool Converter<base::DictionaryValue>::FromV8(v8::Isolate* isolate,
scoped_ptr<atom::V8ValueConverter> converter(new atom::V8ValueConverter);
scoped_ptr<base::Value> value(converter->FromV8Value(
val, v8::Context::GetCurrent()));
if (value->IsType(base::Value::TYPE_DICTIONARY)) {
if (value && value->IsType(base::Value::TYPE_DICTIONARY)) {
out->Swap(static_cast<DictionaryValue*>(value.get()));
return true;
} else {