[SDL/f12/master] Don't crash when trying to exit because of an xio-error
Petr Pisar
ppisar at fedoraproject.org
Tue Aug 3 12:46:16 UTC 2010
commit a10cbd53c5de69409eaacadb94abf856a08d7c82
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
Bug numbers: rh603984, sdl1009
SDL-1.2.14-xio_error-rh603984.patch | 26 ++++++++++++++++++++++++++
SDL.spec | 8 +++++++-
2 files changed, 33 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 11d0dd2..330299c 100644
--- a/SDL.spec
+++ b/SDL.spec
@@ -1,7 +1,7 @@
Summary: A cross-platform multimedia library
Name: SDL
Version: 1.2.13
-Release: 11%{?dist}
+Release: 12%{?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
@@ -27,6 +27,8 @@ Patch30: SDL-1.2.13-rh484362.patch
# upstream patch:
# qemu-kvm segfaults on startup in SDL_memcpyMMX/SSE
Patch31: SDL-1.2.13-rh487720.patch
+# Submitted upstream: http://bugzilla.libsdl.org/show_bug.cgi?id=1009
+Patch32: SDL-1.2.14-xio_error-rh603984.patch
URL: http://www.libsdl.org/
License: LGPLv2+
@@ -91,6 +93,7 @@ static SDL applications.
%patch29 -p1 -b .pa-rewrite
%patch30 -p1 -b .rh484362
%patch31 -p1 -b .rh487720
+%patch32 -p1 -b .xio_patch
%build
aclocal
@@ -148,6 +151,9 @@ rm -rf %{buildroot}
%{_libdir}/lib*.a
%changelog
+* Tue Aug 3 2010 Petr Pisar <ppisar at redhat.com> 1.2.13-12
+- 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.13-11
- added repackage.sh script to remove joyos2,h and symbian.zip because of
licensing problems
More information about the scm-commits
mailing list