summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2012-02-10 17:05:38 +0100
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2012-02-10 17:10:06 +0100
commitc83ebb837f223b532a6d66709d48c7404b00a394 (patch)
tree36217a8085becece68d1d60b4c02235d3de38275 /src/plugins/qmldesigner
parent945d7092d19cc01324dd092255b916262032cd20 (diff)
downloadqt-creator-c83ebb837f223b532a6d66709d48c7404b00a394.tar.gz
QmlDesigner: crash fix
This avoids an infinite recursion. For some reason "" might be a proper prototype in some cases. Change-Id: Ib3af9d0ff2fbf87b2ba20a79e8b456831e7a940f Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'src/plugins/qmldesigner')
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index c8d3d59b94..bd7cb46ad3 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
@@ -182,6 +182,8 @@ QList<PropertyInfo> getQmlTypes(const CppComponentValue *ov, const ContextPtr &c
QList<PropertyInfo> list;
if (!ov)
return list;
+ if (ov->className().isEmpty())
+ return list;
PropertyMemberProcessor processor;
ov->processMembers(&processor);
@@ -256,6 +258,9 @@ QList<PropertyInfo> getObjectTypes(const ObjectValue *ov, const ContextPtr &cont
QList<PropertyInfo> list;
if (!ov)
return list;
+ if (ov->className().isEmpty())
+ return list;
+
PropertyMemberProcessor processor;
ov->processMembers(&processor);