mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-24 22:05:05 +00:00
Safety fix: clear "_this->current_glwin" when destroying the window
(cherry picked from commit 0c048d98af449f1bc540e256c90eb792f1effff4)
This commit is contained in:
parent
4fa21ee5ed
commit
6574e5eb57
|
@ -3272,6 +3272,10 @@ void SDL_DestroyWindow(SDL_Window *window)
|
||||||
_this->grabbed_window = NULL; /* ungrabbing input. */
|
_this->grabbed_window = NULL; /* ungrabbing input. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_this->current_glwin == window) {
|
||||||
|
_this->current_glwin = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Now invalidate magic */
|
/* Now invalidate magic */
|
||||||
window->magic = NULL;
|
window->magic = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue