From 09bb332f09c8975dad4f448cc786cfb022111e00 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 29 Nov 2011 08:44:14 +0100 Subject: QmlJS: Add protection against attached types attaching to themselves. Change-Id: Ib81d5e6baabf5ac8d18411e8936098908de2c2bb Task-number: QTCREATORBUG-6635 Reviewed-by: Leandro Melo (cherry picked from commit 25842cb13a18ec946fe80b6d869f2b00dbd2ce9c) Reviewed-by: Eike Ziller --- src/libs/qmljs/qmljsinterpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.1