src/events/SDL_mouse.c
changeset 8983 21f5923cfd15
parent 8976 1a5d959d7b32
child 9161 6e34073ef024
     1.1 --- a/src/events/SDL_mouse.c	Mon Jul 07 10:42:19 2014 -0700
     1.2 +++ b/src/events/SDL_mouse.c	Mon Jul 07 11:00:25 2014 -0700
     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 != NULL && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) {
     1.8 +    if (window && ((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) {
    1.12 @@ -247,7 +247,7 @@
    1.13  
    1.14      /* make sure that the pointers find themselves inside the windows,
    1.15         unless we have the mouse captured. */
    1.16 -    if (window != NULL && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) {
    1.17 +    if (window && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) {
    1.18          int x_max = 0, y_max = 0;
    1.19  
    1.20          // !!! FIXME: shouldn't this be (window) instead of (mouse->focus)?