Safety fix: clear "_this->wakeup_window" when destroying the window

(cherry picked from commit c838ccf0e3)
This commit is contained in:
Sylvain authored and Sam Lantinga committed 2023-03-28 08:29:24 -07:00
1 parent 6574e5eb57
commit 16c9bad786
1 file changed
+4
+4
View File
@@ -3276,6 +3276,10 @@ void SDL_DestroyWindow(SDL_Window *window)
_this->current_glwin = NULL;
}
if (_this->wakeup_window == window) {
_this->wakeup_window = NULL;
}
/* Now invalidate magic */
window->magic = NULL;