diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-22 13:26:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-29 10:39:01 +0100 |
commit | ffcdbfa03f8bb36b521f8c1a703ee24085fe25bd (patch) | |
tree | ddee0370444a4f71cabb7847e7f1eb758622bd9f /src/quick/items/context2d | |
parent | af22149dd8daf593182fec978f15dc1667c9cf8d (diff) |
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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/quick/items/context2d')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index 5abab8500b..2b2504daf2 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -3194,6 +3194,9 @@ void QQuickJSContext2DPixelData::putIndexed(QV4::Managed *m, uint index, const Q { QV4::ExecutionEngine *v4 = m->engine(); QV4::Scope scope(v4); + if (scope.hasException()) + return; + QV4::Scoped<QQuickJSContext2DPixelData> r(scope, m->as<QQuickJSContext2DPixelData>()); if (!r) { v4->current->throwTypeError(); |