diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 04:50:30 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-08 04:50:30 (GMT) |
commit | 0b354c8a2f2a0b76434546ff3e4f6a0d94a05b4b (patch) | |
tree | 72f87465eecade37554c7199bb3534e87293662f /src/declarative | |
parent | a8247ce85808614f6ec921a37bae9fb0d447252b (diff) | |
download | Qt-0b354c8a2f2a0b76434546ff3e4f6a0d94a05b4b.zip Qt-0b354c8a2f2a0b76434546ff3e4f6a0d94a05b4b.tar.gz Qt-0b354c8a2f2a0b76434546ff3e4f6a0d94a05b4b.tar.bz2 |
Do not create a QScriptValue for an object being deleted
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 10b9fab..32ba2c3 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -100,6 +100,9 @@ QScriptValue QDeclarativeObjectScriptClass::newQObject(QObject *object, int type if (!object) return newObject(scriptEngine, this, new ObjectData(object, type)); + if (QObjectPrivate::get(object)->wasDeleted) + return scriptEngine->undefinedValue(); + QDeclarativeDeclarativeData *ddata = QDeclarativeDeclarativeData::get(object, true); if (!ddata) { |