diff options
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index 73c579f3eb..b879e3fc14 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -745,7 +745,10 @@ ReturnedValue Runtime::method_getIterator(ExecutionEngine *engine, const Value & if (!f) return engine->throwTypeError(); JSCallData cData(scope, 0, nullptr, o); - return f->call(cData); + ScopedObject it(scope, f->call(cData)); + if (!it) + return engine->throwTypeError(); + return it->asReturnedValue(); } return engine->newForInIteratorObject(o)->asReturnedValue(); } |