nullptr check on update_surface

This commit is contained in:
David Griswold 2026-03-20 08:49:41 +03:00 committed by OpenSauce
parent 7a60160f68
commit 64cb0b57fb

View File

@ -25,9 +25,10 @@ bool EmuWindow_Android::OnSurfaceChanged(ANativeWindow* surface) {
render_window = surface;
window_info.type = Frontend::WindowSystemType::Android;
window_info.render_surface = surface;
window_width = ANativeWindow_getWidth(surface);
window_height = ANativeWindow_getHeight(surface);
if (surface != nullptr) {
window_width = ANativeWindow_getWidth(surface);
window_height = ANativeWindow_getHeight(surface);
}
StopPresenting();
OnFramebufferSizeChanged();
return true;