android: Fix pause emulator button crashing the emulator (#239)

This commit is contained in:
kleidis 2024-08-22 23:33:05 +02:00 committed by PabloMK7
parent 0d40b13828
commit 1eb6e840d4

View File

@ -309,10 +309,12 @@ void Java_org_citra_citra_1emu_NativeLibrary_surfaceChanged(JNIEnv* env,
void Java_org_citra_citra_1emu_NativeLibrary_surfaceDestroyed([[maybe_unused]] JNIEnv* env, void Java_org_citra_citra_1emu_NativeLibrary_surfaceDestroyed([[maybe_unused]] JNIEnv* env,
[[maybe_unused]] jobject obj) { [[maybe_unused]] jobject obj) {
ANativeWindow_release(s_surf); if (s_surf != nullptr) {
s_surf = nullptr; ANativeWindow_release(s_surf);
if (window) { s_surf = nullptr;
window->OnSurfaceChanged(s_surf); if (window) {
window->OnSurfaceChanged(s_surf);
}
} }
} }