aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index c01f172eb3..644db82823 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -304,7 +304,8 @@ QV4::ReturnedValue __qmljs_in(ExecutionContext *ctx, const ValueRef left, const
{
if (!right->isObject())
ctx->throwTypeError();
- String *s = left->toString(ctx);
+ Scope scope(ctx);
+ ScopedString s(scope, left->toString(ctx));
bool r = right->objectValue()->__hasProperty__(s);
return Value::fromBoolean(r).asReturnedValue();
}