diff options
author | Gabriel Jacobo <gabomdq@gmail.com> | 2014-06-28 12:50:17 -0300 |
---|---|---|
committer | Gabriel Jacobo <gabomdq@gmail.com> | 2014-06-28 12:50:17 -0300 |
commit | eaa8a2244a1525e8acfe7fcfd163009a424567cb (patch) | |
tree | 84eeedd5e53f688939c837d04d746341e3dc30c7 /src/events/SDL_mouse.c | |
parent | f528278c75a9d6df5a3a4c1ccec8b082e4f3aaa4 (diff) |
Another fix to prevent dereferencing a null window pointer in SDL_mouse.c
Diffstat (limited to 'src/events/SDL_mouse.c')
-rw-r--r-- | src/events/SDL_mouse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 027f63fad9..a3ee3a2d6e 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -248,7 +248,7 @@ SDL_PrivateSendMouseMotion(SDL_Window * window, SDL_MouseID mouseID, int relativ /* make sure that the pointers find themselves inside the windows, unless we have the mouse captured. */ - if ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0) { + if (window != NULL && ((window->flags & SDL_WINDOW_MOUSE_CAPTURE) == 0)) { int x_max = 0, y_max = 0; // !!! FIXME: shouldn't this be (window) instead of (mouse->focus)? |