From ffcdbfa03f8bb36b521f8c1a703ee24085fe25bd Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 22 Oct 2013 13:26:08 +0200 Subject: Protect write accesses to objects Don't write to objects if we have a pending exception to avoid any side effects. Change-Id: I9f93a9195a652dbae7033cc6ebb355d5d86e9b5e Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4sequenceobject.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/jsruntime/qv4sequenceobject.cpp') diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index f6feb2f170..5a42c7fe35 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -231,6 +231,9 @@ public: void containerPutIndexed(uint index, const QV4::ValueRef value) { + if (internalClass->engine->hasException) + return; + /* Qt containers have int (rather than uint) allowable indexes. */ if (index > INT_MAX) { generateWarning(engine()->current, QLatin1String("Index out of range during indexed set")); -- cgit v1.2.1