From 3526db3b8832c357b368014e6c8ebab63d4071da Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 13 Jan 2011 14:40:31 +1000 Subject: Don't crash Qt Creator when debugging an object alias Task-number: QTBUG-16131 --- src/declarative/qml/qdeclarativeproperty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index e7dae98..8210314 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -665,7 +665,7 @@ QDeclarativePropertyPrivate::binding(QObject *object, int coreIndex, int valueTy static_cast(metaObjectForProperty(object->metaObject(), coreIndex)); QObject *aObject = 0; int aCoreIndex = -1; int aValueTypeIndex = -1; - if (!vme->aliasTarget(coreIndex, &aObject, &aCoreIndex, &aValueTypeIndex)) + if (!vme->aliasTarget(coreIndex, &aObject, &aCoreIndex, &aValueTypeIndex) || aCoreIndex == -1) return 0; // This will either be a value type sub-reference or an alias to a value-type sub-reference not both -- cgit v0.12