mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-07 04:17:14 +00:00
Safety fix: clear "_this->current_glwin" when destroying the window
(cherry picked from commit 0c048d98af)
This commit is contained in:
@@ -3272,6 +3272,10 @@ void SDL_DestroyWindow(SDL_Window *window)
|
||||
_this->grabbed_window = NULL; /* ungrabbing input. */
|
||||
}
|
||||
|
||||
if (_this->current_glwin == window) {
|
||||
_this->current_glwin = NULL;
|
||||
}
|
||||
|
||||
/* Now invalidate magic */
|
||||
window->magic = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user