summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()) {