diff options
Diffstat (limited to 'src/qml/jsruntime/qv4lookup.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4lookup.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4lookup.cpp b/src/qml/jsruntime/qv4lookup.cpp index 4ee24d29eb..10c94734d6 100644 --- a/src/qml/jsruntime/qv4lookup.cpp +++ b/src/qml/jsruntime/qv4lookup.cpp @@ -97,7 +97,7 @@ ReturnedValue Lookup::getterGeneric(QV4::Lookup *l, const ValueRef object) switch (object->type()) { case Value::Undefined_Type: case Value::Null_Type: - engine->current->throwTypeError(); + return engine->current->throwTypeError(); case Value::Boolean_Type: proto = engine->booleanClass->prototype; break; @@ -439,6 +439,8 @@ void Lookup::setterGeneric(Lookup *l, const ValueRef object, const ValueRef valu ScopedObject o(scope, object); if (!o) { o = __qmljs_convert_to_object(scope.engine->current, object); + if (!o) // type error + return; ScopedString s(scope, l->name); o->put(s, value); return; |