Permalink
Browse files

Android: Avoid race on surface destroyed.

Avoids a segfault in this scenario.
  • Loading branch information...
unknownbrackets committed Oct 7, 2018
1 parent d5d572d commit 9cb471e5bd6551a1144f208d22451a7b54fb54a1
Showing with 1 addition and 1 deletion.
  1. +1 −1 android/jni/app-android.cpp
@@ -939,7 +939,7 @@ extern "C" bool JNICALL Java_org_ppsspp_ppsspp_NativeActivity_runEGLRenderLoop(J
// This is up here to prevent race conditions, in case we pause during init.
renderLoopRunning = true;
ANativeWindow *wnd = ANativeWindow_fromSurface(env, _surf);
ANativeWindow *wnd = _surf ? ANativeWindow_fromSurface(env, _surf) : nullptr;
WLOG("runEGLRenderLoop. display_xres=%d display_yres=%d", display_xres, display_yres);

0 comments on commit 9cb471e

Please sign in to comment.