mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-05 04:47:50 +00:00
Fixed crash when the current mouse capture window is destroyed
Fixes https://github.com/libsdl-org/SDL/issues/10494 (cherry picked from commit91d97a367e) (cherry picked from commit5ca0639a42)
This commit is contained in:
@@ -3303,6 +3303,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user