From 9dc2614e7d2df4e5387316f34fa53d0c49a24a83 Mon Sep 17 00:00:00 2001 From: Gabriel Jacobo Date: Sat, 28 Jun 2014 12:50:17 -0300 Subject: [PATCH] Another fix to prevent dereferencing a null window pointer in SDL_mouse.c --- src/events/SDL_mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index 027f63fad9ff9..a3ee3a2d6e48f 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)?