summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-05-11 03:58:38 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-05-11 03:58:38 (GMT)
commit554999e97a350b3c04123a6ef03d21a841ab73ad (patch)
tree3ba785a3cedac8dbd8974b3574e81c6f4664f448 /src/declarative
parent9edfcd1ecd905ca27fbe9f241e37ab5fb204f89a (diff)
downloadQt-554999e97a350b3c04123a6ef03d21a841ab73ad.zip
Qt-554999e97a350b3c04123a6ef03d21a841ab73ad.tar.gz
Qt-554999e97a350b3c04123a6ef03d21a841ab73ad.tar.bz2
Fix crash
Component {} would crash the compiler.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 5dbc5c3..a40b7c8 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -665,6 +665,9 @@ bool QmlCompiler::compileComponent(Object *obj, int ctxt)
if (obj->defaultProperty && obj->defaultProperty->values.count())
root = obj->defaultProperty->values.first()->object;
+ if (!root)
+ COMPILE_EXCEPTION("Cannot create empty component specification");
+
COMPILE_CHECK(compileComponentFromRoot(root, ctxt));
if (idProp && idProp->values.count()) {