QmlJS: Add protection against attached types attaching to themselves.

Change-Id: Ib81d5e6baabf5ac8d18411e8936098908de2c2bb
Task-number: QTCREATORBUG-6635
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm
2011-11-29 08:44:14 +01:00
parent a7e4f3ce04
commit 25842cb13a

View File

@@ -285,7 +285,7 @@ void CppComponentValue::processMembers(MemberProcessor *processor) const
const QString &attachedTypeName = _metaObject->attachedTypeName();
if (!attachedTypeName.isEmpty()) {
const CppComponentValue *attachedType = valueOwner()->cppQmlTypes().objectByCppName(attachedTypeName);
if (attachedType)
if (attachedType && attachedType != this) // ### only weak protection against infinite loops
attachedType->processMembers(processor);
}