1
0
Fork 0
mirror of https://github.com/PabloMK7/citra.git synced 2025-04-05 19:41:32 +02:00

android: Fix pause emulator button crashing the emulator ()

This commit is contained in:
kleidis 2024-08-22 23:33:05 +02:00 committed by GitHub
parent 5115f640c2
commit 9c1f778e79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,
[[maybe_unused]] jobject obj) {
ANativeWindow_release(s_surf);
s_surf = nullptr;
if (window) {
window->OnSurfaceChanged(s_surf);
if (s_surf != nullptr) {
ANativeWindow_release(s_surf);
s_surf = nullptr;
if (window) {
window->OnSurfaceChanged(s_surf);
}
}
}