summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-04-25 15:46:24 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-04-25 16:51:32 +0000
commit40fdc4f44cd07c91f2372ef222b1948b417f27c6 (patch)
tree5d29558d9d5ab5821e95fe7cc300c2737b567fdf /src/plugins
parentb6ae2695af68cd5d2adf9b8fa2b676b2cca9eede (diff)
Check for qApp before using it in ibus plugin
We might call updatePreeditText from the QCoreApplication dtor by running an event loop from inside a "post routine" added with qAddPostRoutine(). Task-number: QTBUG-60000 Change-Id: I04c08fe36bfa63ac345a06e50952d2ec83a78ac0 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
index 0a55f689c6..1ee81fa9c9 100644
--- a/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
+++ b/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp
@@ -267,6 +267,9 @@ void QIBusPlatformInputContext::commitText(const QDBusVariant &text)
void QIBusPlatformInputContext::updatePreeditText(const QDBusVariant &text, uint cursorPos, bool visible)
{
+ if (!qApp)
+ return;
+
QObject *input = qApp->focusObject();
if (!input)
return;