mirror of
https://github.com/encounter/SDL.git
synced 2025-12-11 14:41:56 +00:00
This bug was introduced on this rev: https://hg.libsdl.org/SDL/rev/42f6bd8c8575
This commit is contained in:
@@ -142,7 +142,7 @@ SDL_UpdateMouseFocus(SDL_Window * window, int x, int y, Uint32 buttonstate)
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
SDL_bool inWindow = SDL_TRUE;
|
||||
|
||||
if ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0) {
|
||||
if (window != NULL && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) {
|
||||
int w, h;
|
||||
SDL_GetWindowSize(window, &w, &h);
|
||||
if (x < 0 || y < 0 || x >= w || y >= h) {
|
||||
|
||||
Reference in New Issue
Block a user