Android: Fix crash at shutdown when keyboard is visible
This is a follow-up to 4c6ebe5f9e
.
Crash was still 100% reproducible for me with the previous fix.
Task-number: QTBUG-40957
Change-Id: Ie59cfe4f1fc746251fe06ba96369738098b2a35f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
41826cfbae
commit
5a278dd42a
@ -47,6 +47,7 @@
|
||||
#include <QTouchEvent>
|
||||
#include <QPointer>
|
||||
|
||||
#include <QGuiApplication>
|
||||
#include <QDebug>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -716,7 +717,7 @@ namespace QtAndroidInput
|
||||
static void keyboardVisibilityChanged(JNIEnv */*env*/, jobject /*thiz*/, jboolean /*visibility*/)
|
||||
{
|
||||
QAndroidInputContext *inputContext = QAndroidInputContext::androidInputContext();
|
||||
if (inputContext)
|
||||
if (inputContext && qGuiApp)
|
||||
inputContext->emitInputPanelVisibleChanged();
|
||||
#ifdef QT_DEBUG_ANDROID_IM_PROTOCOL
|
||||
qDebug() << "@@@ KEYBOARDVISIBILITYCHANGED" << inputContext;
|
||||
|
Loading…
Reference in New Issue
Block a user