src/events/SDL_mouse.c
changeset 6755 af77e1a6faf0
parent 6675 20f3cdea0fd2
child 6829 36ce2e6166e7
     1.1 --- a/src/events/SDL_mouse.c	Fri Dec 14 18:50:07 2012 +0000
     1.2 +++ b/src/events/SDL_mouse.c	Sat Dec 15 00:30:17 2012 +0000
     1.3 @@ -379,6 +379,12 @@
     1.4  SDL_WarpMouseInWindow(SDL_Window * window, int x, int y)
     1.5  {
     1.6      SDL_Mouse *mouse = SDL_GetMouse();
     1.7 +	
     1.8 +	if ( window == NULL )
     1.9 +		window = mouse->focus;
    1.10 +	
    1.11 +	if ( window == NULL )
    1.12 +		return;
    1.13  
    1.14      if (mouse->WarpMouse) {
    1.15          mouse->WarpMouse(window, x, y);