RedHat patch: SDL-1.2.14-xio_error-rh603984.patch SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sun, 18 Jul 2010 11:24:37 -0700
branchSDL-1.2
changeset 4553a1af511bbbdd
parent 4551 a5865d4b6495
child 4554 4deaba8b1b42
RedHat patch: SDL-1.2.14-xio_error-rh603984.patch
src/video/x11/SDL_x11mouse.c
src/video/x11/SDL_x11wm.c
     1.1 --- a/src/video/x11/SDL_x11mouse.c	Sun Jul 18 11:22:47 2010 -0700
     1.2 +++ b/src/video/x11/SDL_x11mouse.c	Sun Jul 18 11:24:37 2010 -0700
     1.3 @@ -230,6 +230,10 @@
     1.4  	char *env_override;
     1.5  	int enable_relative = 1;
     1.6  
     1.7 +	/* This happens when quiting after an xio error */
     1.8 +	if ( SDL_Display == NULL )
     1.9 +	        return;
    1.10 +
    1.11  	/* Allow the user to override the relative mouse mode.
    1.12  	   They almost never want to do this, as it seriously affects
    1.13  	   applications that rely on continuous relative mouse motion.
     2.1 --- a/src/video/x11/SDL_x11wm.c	Sun Jul 18 11:22:47 2010 -0700
     2.2 +++ b/src/video/x11/SDL_x11wm.c	Sun Jul 18 11:24:37 2010 -0700
     2.3 @@ -329,7 +329,7 @@
     2.4  {
     2.5  	int result;
     2.6  
     2.7 -	if ( this->screen == NULL ) {
     2.8 +	if ( this->screen == NULL || SDL_Display == NULL ) {
     2.9  		return(SDL_GRAB_OFF);
    2.10  	}
    2.11  	if ( ! SDL_Window ) {