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>bb10
parent
b6ae2695af
commit
40fdc4f44c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue