summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-08-24 08:34:41 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-08-24 08:34:41 (GMT)
commitcb81a637c8ef041cff2e96c6065763084776d75a (patch)
tree264511d66a432799deb77403a56ef666b17f4408 /src/declarative/qml
parenta853db4f7ce0c685eb3e849085185a87cb4c488d (diff)
downloadQt-cb81a637c8ef041cff2e96c6065763084776d75a.zip
Qt-cb81a637c8ef041cff2e96c6065763084776d75a.tar.gz
Qt-cb81a637c8ef041cff2e96c6065763084776d75a.tar.bz2
Fix crash on missing imports.
This would previously crash: Blah.Rectangle {}
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlengine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index c56da6e..fd18b26 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -1418,6 +1418,9 @@ void QmlEnginePrivate::resolveNamespace(const Imports& imports, const QByteArray
*/
bool QmlEnginePrivate::resolveTypeInNamespace(ImportedNamespace* ns, const QByteArray& type, QmlType** type_return, QUrl* url_return ) const
{
+ if (!ns)
+ return false;
+
if (type_return) {
QmlType* t = ns->d->findBuiltin(type);
if (!t) t = QmlMetaType::qmlType(type,0,0); // Try global namespace