Another fix to prevent dereferencing a null window pointer in SDL_mouse.c

main
Gabriel Jacobo 2014-06-28 12:50:17 -03:00
parent a9bb889864
commit 9dc2614e7d
1 changed files with 1 additions and 1 deletions

View File

@ -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)?