src/events/SDL_mouse.c
changeset 8963 f94215b55583
parent 8955 7a74b402790c
child 8965 8eceea447276
     1.1 --- a/src/events/SDL_mouse.c	Sat Jun 28 12:17:29 2014 -0300
     1.2 +++ b/src/events/SDL_mouse.c	Sat Jun 28 12:36:44 2014 -0300
     1.3 @@ -142,7 +142,7 @@
     1.4      SDL_Mouse *mouse = SDL_GetMouse();
     1.5      SDL_bool inWindow = SDL_TRUE;
     1.6  
     1.7 -    if ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0) {
     1.8 +    if (window != NULL && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) {
     1.9          int w, h;
    1.10          SDL_GetWindowSize(window, &w, &h);
    1.11          if (x < 0 || y < 0 || x >= w || y >= h) {