summaryrefslogtreecommitdiffstats
path: root/src/script/api/qscriptvalue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/qscriptvalue.cpp')
-rw-r--r--src/script/api/qscriptvalue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index ff2823b..bb8b2b7 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -865,7 +865,7 @@ bool QScriptValue::instanceOf(const QScriptValue &other) const
QScriptEnginePrivate *eng_p = QScriptEnginePrivate::get(d->engine);
JSC::JSValue jscProto = eng_p->scriptValueToJSCValue(other.property(QLatin1String("prototype")));
if (!jscProto)
- return false;
+ jscProto = JSC::jsUndefined();
JSC::ExecState *exec = eng_p->globalObject->globalExec();
JSC::JSValue jscOther = eng_p->scriptValueToJSCValue(other);
return JSC::asObject(jscOther)->hasInstance(exec, d->jscValue, jscProto);