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 4553 a1af511bbbdd
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
--- a/src/video/x11/SDL_x11mouse.c	Sun Jul 18 11:22:47 2010 -0700
+++ b/src/video/x11/SDL_x11mouse.c	Sun Jul 18 11:24:37 2010 -0700
@@ -230,6 +230,10 @@
 	char *env_override;
 	int enable_relative = 1;
 
+	/* This happens when quiting after an xio error */
+	if ( SDL_Display == NULL )
+	        return;
+
 	/* Allow the user to override the relative mouse mode.
 	   They almost never want to do this, as it seriously affects
 	   applications that rely on continuous relative mouse motion.
--- a/src/video/x11/SDL_x11wm.c	Sun Jul 18 11:22:47 2010 -0700
+++ b/src/video/x11/SDL_x11wm.c	Sun Jul 18 11:24:37 2010 -0700
@@ -329,7 +329,7 @@
 {
 	int result;
 
-	if ( this->screen == NULL ) {
+	if ( this->screen == NULL || SDL_Display == NULL ) {
 		return(SDL_GRAB_OFF);
 	}
 	if ( ! SDL_Window ) {