Safety fix: clear "_this->current_glwin" when destroying the window
This commit is contained in:
@@ -3458,6 +3458,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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user