Clear SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER when ANativeWindow is freed (#16024)

(cherry picked from commit 8319d69f72)
This commit is contained in:
Hadrian Tang
2026-07-19 05:59:22 +08:00
committed by Sam Lantinga
parent 4c776b5e33
commit 7eaceaa1d7

View File

@@ -1335,6 +1335,7 @@ retry:
#endif
if (data->native_window) {
SDL_SetPointerProperty(SDL_GetWindowProperties(Android_Window), SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER, NULL);
ANativeWindow_release(data->native_window);
data->native_window = NULL;
}