From f3854db64bcaa0f26faf5ff1414d3b9ccfc00e35 Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 26 Oct 2009 13:13:30 +0100 Subject: 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 --- src/gui/kernel/qsoftkeymanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v0.12