diff options
-rw-r--r-- | src/declarative/qml/qmltypenamescriptclass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/qml/qmltypenamescriptclass.cpp b/src/declarative/qml/qmltypenamescriptclass.cpp index 7c5e5b0..61b57c4 100644 --- a/src/declarative/qml/qmltypenamescriptclass.cpp +++ b/src/declarative/qml/qmltypenamescriptclass.cpp @@ -125,13 +125,15 @@ QmlTypeNameScriptClass::queryProperty(Object *obj, const Identifier &name, } } return 0; - } else { + } else if (data->object) { // Must be an attached property object = qmlAttachedPropertiesObjectById(data->type->index(), data->object); if (!object) return 0; return ep->objectClass->queryProperty(object, name, flags); } } + + return 0; } QScriptValue QmlTypeNameScriptClass::property(Object *obj, const Identifier &name) |