rpms/abuse/FC-5 abuse_sdl-0.7.0-exit-intro-crash.patch, NONE, 1.1 abuse.spec, 1.2, 1.3

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Thu Aug 24 19:08:56 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/abuse/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11188

Modified Files:
	abuse.spec 
Added Files:
	abuse_sdl-0.7.0-exit-intro-crash.patch 
Log Message:
* Thu Aug 24 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.7.0-2
- Fix abuse from crashing on exit when you try to close the window while the
  intro is still playing


abuse_sdl-0.7.0-exit-intro-crash.patch:

--- NEW FILE abuse_sdl-0.7.0-exit-intro-crash.patch ---
--- abuse_sdl-0.7.0/src/game.cpp.shit	2006-08-24 16:39:45.000000000 +0200
+++ abuse_sdl-0.7.0/src/game.cpp	2006-08-24 16:43:22.000000000 +0200
@@ -1269,9 +1269,14 @@
 		if( DEFINEDP( logo_snd ) && ( sound_avail & SFX_INITIALIZED ) )
 			cash.sfx( lnumber_value( logo_snd ) )->play( sfx_volume );
 
-		image blank( 2, 2 );
-		blank.clear();
-		eh->set_mouse_shape( blank.copy(), 0, 0 );      // don't show mouse
+		/* This must be a dynamic allocated image because if it
+		   is not and the window gets closed during do_title, then
+		   exit() will try to delete (through the desctructor of
+		   image_list in image.cpp) the image on the stack -> boom. */
+		image *blank = new image( 2, 2 );
+		blank->clear();
+		eh->set_mouse_shape( blank->copy(), 0, 0 );      // don't show mouse
+		delete blank;
 		fade_in( cash.img( cdc_logo ), 32 );
 
 		milli_wait( 900 );


Index: abuse.spec
===================================================================
RCS file: /cvs/extras/rpms/abuse/FC-5/abuse.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- abuse.spec	18 Aug 2006 06:02:37 -0000	1.2
+++ abuse.spec	24 Aug 2006 19:08:56 -0000	1.3
@@ -1,6 +1,6 @@
 Name:           abuse
 Version:        0.7.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        The classic Crack-Dot-Com game
 Group:          Amusements/Games
 License:        GPL
@@ -8,6 +8,7 @@
 Source0:        http://www.labyrinth.net.au/~trandor/files/abuse_sdl-%{version}.tar.bz2
 Patch0:         abuse_sdl-0.7.0-debian.patch
 Patch1:         abuse_sdl-0.7.0-fixes.patch
+Patch2:         abuse_sdl-0.7.0-exit-intro-crash.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  ImageMagick SDL-devel alsa-lib-devel libGLU-devel
 Requires:       abuse-data
@@ -21,6 +22,7 @@
 %setup -q -n abuse_sdl-%{version}
 %patch0 -p1 -z .deb
 %patch1 -p1 -z .fix
+%patch2 -p1 -z .intro
 
 
 %build
@@ -63,5 +65,9 @@
 
 
 %changelog
+* Thu Aug 24 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.7.0-2
+- Fix abuse from crashing on exit when you try to close the window while the
+  intro is still playing
+
 * Wed Aug 16 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 0.7.0-1
 - Initial FE submission




More information about the fedora-extras-commits mailing list