Android: Avoid race on surface destroyed.

Avoids a segfault in this scenario.
This commit is contained in:
Unknown W. Brackets 2018-10-07 16:13:34 -07:00
parent d5d572d38e
commit 9cb471e5bd

View File

@ -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);