Skip to content

Commit

Permalink
Another fix to prevent dereferencing a null window pointer in SDL_mou…
Browse files Browse the repository at this point in the history
…se.c
  • Loading branch information
gabomdq committed Jun 28, 2014
1 parent a9bb889 commit 9dc2614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/events/SDL_mouse.c
Expand Up @@ -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)?
Expand Down

0 comments on commit 9dc2614

Please sign in to comment.