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

This commit is contained in:
Sylvain authored and Sam Lantinga committed 2023-03-28 08:28:31 -07:00
1 parent 0c048d98af
commit c838ccf0e3
1 file changed
+4
+4
View File
@@ -3462,6 +3462,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;