rpms/abuse/devel abuse_sdl-0.7.0-exit-intro-crash.patch,NONE,1.1

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


Author: jwrdegoede

Update of /cvs/extras/rpms/abuse/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11028

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 );




More information about the fedora-extras-commits mailing list