diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-11 03:58:38 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-05-11 03:58:38 (GMT) |
commit | 554999e97a350b3c04123a6ef03d21a841ab73ad (patch) | |
tree | 3ba785a3cedac8dbd8974b3574e81c6f4664f448 | |
parent | 9edfcd1ecd905ca27fbe9f241e37ab5fb204f89a (diff) | |
download | Qt-554999e97a350b3c04123a6ef03d21a841ab73ad.zip Qt-554999e97a350b3c04123a6ef03d21a841ab73ad.tar.gz Qt-554999e97a350b3c04123a6ef03d21a841ab73ad.tar.bz2 |
Fix crash
Component {} would crash the compiler.
-rw-r--r-- | src/declarative/qml/qmlcompiler.cpp | 3 |
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()) { |