summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-05 07:39:35 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-05 07:39:35 (GMT)
commitc7a886c4bc04bdbd470207d188499778d6380532 (patch)
tree1a2ffcbb41a838557b294977155889e1a5ed1618 /src/declarative/qml
parent70ffa3d571c5085d2702cdd0b43f85ddb2c0b8eb (diff)
parent0bc45e6b54f67a3f5e8b7c3b780a124de1d9570d (diff)
downloadQt-c7a886c4bc04bdbd470207d188499778d6380532.zip
Qt-c7a886c4bc04bdbd470207d188499778d6380532.tar.gz
Qt-c7a886c4bc04bdbd470207d188499778d6380532.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qmlengine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index 3df04b2..e46205d 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -626,6 +626,11 @@ QScriptValue QmlEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngi
url = QUrl(ctxt->argument(2).toString());
QObject *parentArg = activeEnginePriv->objectClass->toQObject(ctxt->argument(1));
QmlContext *qmlCtxt = qmlContext(parentArg);
+ if(!parentArg || !qmlCtxt){
+ //TODO: Could use a qmlInfo() like function for script functions
+ qWarning() << "createQmlObject called with invalid parent object";
+ return engine->nullValue();
+ }
if (url.isEmpty()) {
url = qmlCtxt->resolvedUrl(QUrl(QLatin1String("<Unknown File>")));
} else {