diff options
author | Kent Hansen <khansen@trolltech.com> | 2009-09-22 18:01:43 (GMT) |
---|---|---|
committer | Kent Hansen <khansen@trolltech.com> | 2009-09-22 18:04:43 (GMT) |
commit | 66da7e609e92fff2322c1ef42e4ac9132bc33fab (patch) | |
tree | ac1ce13e436e658cb54273a8cc598b58d0136c40 /src/script/bridge | |
parent | 1f67584c5260b0d9f275ed5f3a24e444168ec3eb (diff) | |
download | Qt-66da7e609e92fff2322c1ef42e4ac9132bc33fab.zip Qt-66da7e609e92fff2322c1ef42e4ac9132bc33fab.tar.gz Qt-66da7e609e92fff2322c1ef42e4ac9132bc33fab.tar.bz2 |
don't crash in property access after script class has been set to 0
When the script class is set to 0, we need to remove the script
object's delegate entirely, because the delegate requires a non-0
script class in order to be useful.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/script/bridge')
-rw-r--r-- | src/script/bridge/qscriptclassobject.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp index b57909f..c1e386b 100644 --- a/src/script/bridge/qscriptclassobject.cpp +++ b/src/script/bridge/qscriptclassobject.cpp @@ -77,6 +77,7 @@ QScriptClass *ClassObjectDelegate::scriptClass() const void ClassObjectDelegate::setScriptClass(QScriptClass *scriptClass) { + Q_ASSERT(scriptClass != 0); m_scriptClass = scriptClass; } |