summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-10-26 12:13:30 (GMT)
committeraxis <qt-info@nokia.com>2009-10-26 13:12:12 (GMT)
commitf3854db64bcaa0f26faf5ff1414d3b9ccfc00e35 (patch)
tree6b50e4265ba46926e084bf3a074230fccdeb1912 /src
parent962f875cd48a42cb69855ba05b979aa4a50ca2a2 (diff)
downloadQt-f3854db64bcaa0f26faf5ff1414d3b9ccfc00e35.zip
Qt-f3854db64bcaa0f26faf5ff1414d3b9ccfc00e35.tar.gz
Qt-f3854db64bcaa0f26faf5ff1414d3b9ccfc00e35.tar.bz2
Fixed a crash in the QApplication autotest.
If there is no focusWidget at the time of the event delivery, we must ensure that we don't dereference a null pointer. RevBy: Jason Barron RevBy: Liang Qi
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index fac936f..75c321e 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -189,7 +189,8 @@ bool QSoftKeyManager::event(QEvent *e)
} while (source);
QSoftKeyManagerPrivate::softKeySource = source;
- QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys);
+ if (source)
+ QSoftKeyManagerPrivate::updateSoftKeys_sys(softKeys);
return true;
}
return false;