mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 07:00:48 +00:00
Fixed crash when the current mouse capture window is destroyed
Fixes https://github.com/libsdl-org/SDL/issues/10494
This commit is contained in:
parent
212f7cc355
commit
91d97a367e
1 changed files with 3 additions and 0 deletions
|
|
@ -4099,6 +4099,9 @@ void SDL_DestroyWindow(SDL_Window *window)
|
|||
if (SDL_GetKeyboardFocus() == window) {
|
||||
SDL_SetKeyboardFocus(NULL);
|
||||
}
|
||||
if ((window->flags & SDL_WINDOW_MOUSE_CAPTURE)) {
|
||||
SDL_UpdateMouseCapture(SDL_TRUE);
|
||||
}
|
||||
if (SDL_GetMouseFocus() == window) {
|
||||
SDL_SetMouseFocus(NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue