diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-11-09 11:09:27 +0000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-09 13:13:36 +0100 |
commit | 1c93b9ce6e180e7beeaae32c524a6726d50939c5 (patch) | |
tree | 31fd3b92304ccec14f8f56c624486e125ab594dc /src | |
parent | 0c5f9185502f3f81265a044955bd13040c2446db (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.cpp | 3 |
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; |