From 554999e97a350b3c04123a6ef03d21a841ab73ad Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 11 May 2009 13:58:38 +1000 Subject: Fix crash Component {} would crash the compiler. --- src/declarative/qml/qmlcompiler.cpp | 3 +++ 1 file changed, 3 insertions(+) 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()) { -- cgit v0.12