mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-18 20:18:59 +00:00
Safety fix: clear "_this->current_glwin" when destroying the window
This commit is contained in:
parent
e494844e9a
commit
0c048d98af
1 changed files with 4 additions and 0 deletions
|
|
@ -3458,6 +3458,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue