aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-11-09 11:09:27 +0000
committerQt by Nokia <qt-info@nokia.com>2011-11-09 13:13:36 +0100
commit1c93b9ce6e180e7beeaae32c524a6726d50939c5 (patch)
tree31fd3b92304ccec14f8f56c624486e125ab594dc /src
parent0c5f9185502f3f81265a044955bd13040c2446db (diff)
Fix v4 crash when accessing invalid attached property
Task-number: QTBUG-21883 Change-Id: Ic14a5d494890fc1bc322c660b97f657d640f2ff8 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/v4/qv4compiler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/qml/v4/qv4compiler.cpp b/src/declarative/qml/v4/qv4compiler.cpp
index 857bceb460..31a0a1e63f 100644
--- a/src/declarative/qml/v4/qv4compiler.cpp
+++ b/src/declarative/qml/v4/qv4compiler.cpp
@@ -311,7 +311,8 @@ void QV4CompilerPrivate::visitName(IR::Name *e)
attached.output = currentReg;
attached.reg = currentReg;
attached.exceptionId = exceptionId(e->line, e->column);
- Q_ASSERT(e->declarativeType->attachedPropertiesId() != -1);
+ if (e->declarativeType->attachedPropertiesId() == -1)
+ discard();
attached.id = e->declarativeType->attachedPropertiesId();
gen(attached);
} break;