aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r--src/qml/jsruntime/qv4string.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp
index fd366d26ac..bd4e2b16b0 100644
--- a/src/qml/jsruntime/qv4string.cpp
+++ b/src/qml/jsruntime/qv4string.cpp
@@ -178,6 +178,8 @@ ReturnedValue String::getIndexed(Managed *m, uint index, bool *hasProperty)
void String::put(Managed *m, const StringRef name, const ValueRef value)
{
Scope scope(m->engine());
+ if (scope.hasException())
+ return;
ScopedString that(scope, static_cast<String *>(m));
Scoped<Object> o(scope, that->engine()->newStringObject(that));
o->put(name, value);
@@ -186,6 +188,9 @@ void String::put(Managed *m, const StringRef name, const ValueRef value)
void String::putIndexed(Managed *m, uint index, const ValueRef value)
{
Scope scope(m->engine());
+ if (scope.hasException())
+ return;
+
ScopedString that(scope, static_cast<String *>(m));
Scoped<Object> o(scope, that->engine()->newStringObject(that));
o->putIndexed(index, value);