diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-11-02 13:58:52 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2009-11-03 12:14:19 (GMT) |
commit | 6a89291da7e1322ad81c4939cc9d69db01957a4c (patch) | |
tree | c64e982a92cc29b8421c9f2e5ea9328e18867625 | |
parent | 8ffbb2e7bd2ba0b92aef8d7212ddd47bdcc4411e (diff) | |
download | Qt-6a89291da7e1322ad81c4939cc9d69db01957a4c.zip Qt-6a89291da7e1322ad81c4939cc9d69db01957a4c.tar.gz Qt-6a89291da7e1322ad81c4939cc9d69db01957a4c.tar.bz2 |
Fix for defect introduced by dd48c27f
This change causes some applications to crash due to a null
pointer dereference in QSoftKeyManagerPrivate::updateSoftKeys_sys.
f3854db6 fixes the crash, but introduces incorrect behaviour: the
softkey labels are not updated. To see this:
1. Launch qmediaplayer
2. Open a video clip
3. Video clip starts playing but softkeys still have labels "Open"
and "Cancel"
Reviewed-by: Janne Anttila
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index fac936f..8612e64 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -237,7 +237,10 @@ void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) } } - Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource->window()->windowType(); + const Qt::WindowType sourceWindowType = QSoftKeyManagerPrivate::softKeySource + ? QSoftKeyManagerPrivate::softKeySource->window()->windowType() + : Qt::Widget; + if (needsExitButton && sourceWindowType != Qt::Dialog && sourceWindowType != Qt::Popup) QT_TRAP_THROWING(nativeContainer->SetCommandL(2, EAknSoftkeyExit, qt_QString2TPtrC(QSoftKeyManager::tr("Exit")))); |