[SDL/origin/f13: 1/6] - Don't crash when trying to exit because of an xio-error (rh603984, sdl1009)

Petr Pisar ppisar at fedoraproject.org
Tue Aug 3 10:58:54 UTC 2010


commit 89784c8349b88778e1ccff250e2f218337ae2e4b
Author: Hans de Goede <jwrdegoede at fedoraproject.org>
Date:   Wed Jun 23 15:03:10 2010 +0000

    - Don't crash when trying to exit because of an xio-error (rh603984,
        sdl1009)

 SDL-1.2.14-xio_error-rh603984.patch |   26 ++++++++++++++++++++++++++
 SDL.spec                            |    7 ++++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/SDL-1.2.14-xio_error-rh603984.patch b/SDL-1.2.14-xio_error-rh603984.patch
new file mode 100644
index 0000000..3134576
--- /dev/null
+++ b/SDL-1.2.14-xio_error-rh603984.patch
@@ -0,0 +1,26 @@
+diff -up SDL-1.2.14/src/video/x11/SDL_x11mouse.c~ SDL-1.2.14/src/video/x11/SDL_x11mouse.c
+--- SDL-1.2.14/src/video/x11/SDL_x11mouse.c~	2009-10-13 01:07:15.000000000 +0200
++++ SDL-1.2.14/src/video/x11/SDL_x11mouse.c	2010-06-23 14:16:34.730381512 +0200
+@@ -230,6 +230,10 @@ void X11_CheckMouseModeNoLock(_THIS)
+ 	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.
+diff -up SDL-1.2.14/src/video/x11/SDL_x11wm.c~ SDL-1.2.14/src/video/x11/SDL_x11wm.c
+--- SDL-1.2.14/src/video/x11/SDL_x11wm.c~	2009-10-13 01:07:15.000000000 +0200
++++ SDL-1.2.14/src/video/x11/SDL_x11wm.c	2010-06-23 14:11:55.596629337 +0200
+@@ -329,7 +329,7 @@ SDL_GrabMode X11_GrabInputNoLock(_THIS, 
+ {
+ 	int result;
+ 
+-	if ( this->screen == NULL ) {
++	if ( this->screen == NULL || SDL_Display == NULL ) {
+ 		return(SDL_GRAB_OFF);
+ 	}
+ 	if ( ! SDL_Window ) {
diff --git a/SDL.spec b/SDL.spec
index 5ce08a9..985b7cf 100644
--- a/SDL.spec
+++ b/SDL.spec
@@ -1,7 +1,7 @@
 Summary: A cross-platform multimedia library
 Name: SDL
 Version: 1.2.14
-Release: 4%{?dist}
+Release: 5%{?dist}
 # Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
 # To create the repackaged archive use repackage.sh %{version}
 Source: http://www.libsdl.org/release/%{name}-%{version}_repackaged.tar.gz
@@ -14,6 +14,8 @@ Patch0: SDL-1.2.14-byteorder.patch
 Patch1: SDL-1.2.12-multilib.patch
 Patch2: SDL-1.2.12-disable_yasm.patch
 Patch3: SDL-1.2.14-audiodriver.patch
+# Submitted upstream: http://bugzilla.libsdl.org/show_bug.cgi?id=1009
+Patch4: SDL-1.2.14-xio_error-rh603984.patch
 
 URL: http://www.libsdl.org/
 License: LGPLv2+
@@ -130,6 +132,9 @@ rm -rf %{buildroot}
 %{_libdir}/lib*.a
 
 %changelog
+* Wed Jun 23 2010 Hans de Goede <hdegoede at redhat.com> 1.2.14-5
+- Don't crash when trying to exit because of an xio-error (rh603984, sdl1009)
+
 * Wed Mar 24 2010 Thomas Woerner <twoerner at redhat.com> 1.2.14-4
 - added repackage.sh script to remove joyos2,h and symbian.zip because of
   licensing problems


More information about the scm-commits mailing list