From 7372df3aff414c440d9ddd8697d1e58c60f8cc26 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Sat, 31 Dec 2022 16:53:08 +0100 Subject: [PATCH] android: check if activity is null before using it to show/hide keyboard tentative fix for MINIDUMP-Z --- shell/android-studio/flycast/src/main/jni/src/Android.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/android-studio/flycast/src/main/jni/src/Android.cpp b/shell/android-studio/flycast/src/main/jni/src/Android.cpp index 72bdec5d6..0d3c8c743 100644 --- a/shell/android-studio/flycast/src/main/jni/src/Android.cpp +++ b/shell/android-studio/flycast/src/main/jni/src/Android.cpp @@ -545,6 +545,8 @@ extern "C" JNIEXPORT void JNICALL Java_com_reicast_emulator_periph_InputDeviceMa keyboard = std::make_shared(); GamepadDevice::Register(keyboard); gui_setOnScreenKeyboardCallback([](bool show) { + if (g_activity == nullptr) + return; JNIEnv *env = jvm_attacher.getEnv(); if (show != env->CallBooleanMethod(g_activity, isScreenKeyboardShownMid)) {