We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4b4129 commit 6a0f933Copy full SHA for 6a0f933
src/video/android/SDL_androidwindow.c
@@ -204,6 +204,13 @@ bool Android_nativeSurfaceChanged(SDL_Window *window)
204
SDL_VideoDevice *_this = SDL_GetVideoDevice();
205
SDL_WindowData *data = window->internal;
206
207
+ // Make sure native_window is valid
208
+ if (!data->native_window) {
209
+ if (!Android_nativeSurfaceCreated(window)) {
210
+ return false;
211
+ }
212
213
+
214
// If the surface has been previously destroyed by onNativeSurfaceDestroyed
215
// or if it is the first time, recreate it.
216
if (data->egl_surface == EGL_NO_SURFACE) {
0 commit comments