From cb81a637c8ef041cff2e96c6065763084776d75a Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 24 Aug 2009 18:34:41 +1000 Subject: Fix crash on missing imports. This would previously crash: Blah.Rectangle {} --- src/declarative/qml/qmlengine.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v0.12