summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-11-29 08:44:14 +0100
committerEike Ziller <eike.ziller@nokia.com>2011-12-02 11:00:11 +0100
commit09bb332f09c8975dad4f448cc786cfb022111e00 (patch)
tree4340b1169d27203c2e88986fc052a1fdbd63fa00
parentb98aec872e091520ed261edf7476d6aa22ff4de3 (diff)
downloadqt-creator-09bb332f09c8975dad4f448cc786cfb022111e00.tar.gz
QmlJS: Add protection against attached types attaching to themselves.
Change-Id: Ib81d5e6baabf5ac8d18411e8936098908de2c2bb Task-number: QTCREATORBUG-6635 Reviewed-by: Leandro Melo <leandro.melo@nokia.com> (cherry picked from commit 25842cb13a18ec946fe80b6d869f2b00dbd2ce9c) Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
-rw-r--r--src/libs/qmljs/qmljsinterpreter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index 9aafaeea91..0012fa40ca 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -261,7 +261,7 @@ void QmlObjectValue::processMembers(MemberProcessor *processor) const
const QString &attachedTypeName = _metaObject->attachedTypeName();
if (!attachedTypeName.isEmpty()) {
const QmlObjectValue *attachedType = valueOwner()->cppQmlTypes().objectByCppName(attachedTypeName);
- if (attachedType)
+ if (attachedType && attachedType != this) // ### only weak protection against infinite loops
attachedType->processMembers(processor);
}