From: <av...@us...> - 2012-02-12 20:47:00
|
Revision: 3768 http://sc2.svn.sourceforge.net/sc2/?rev=3768&view=rev Author: avolkov Date: 2012-02-12 20:46:54 +0000 (Sun, 12 Feb 2012) Log Message: ----------- Do not leak MenuState.CurFrame in RestartMenu; bug #1156 Modified Paths: -------------- trunk/sc2/src/uqm/restart.c Modified: trunk/sc2/src/uqm/restart.c =================================================================== --- trunk/sc2/src/uqm/restart.c 2012-02-12 20:18:33 UTC (rev 3767) +++ trunk/sc2/src/uqm/restart.c 2012-02-12 20:46:54 UTC (rev 3768) @@ -60,8 +60,7 @@ TEXT t; UNICODE buf[64]; - s.frame = CaptureDrawable (LoadGraphic (RESTART_PMAP_ANIM)); - pMS->CurFrame = s.frame; + s.frame = pMS->CurFrame; GetFrameRect (s.frame, &r); s.origin.x = (SCREEN_WIDTH - r.extent.width) >> 1; s.origin.y = (SCREEN_HEIGHT - r.extent.height) >> 1; @@ -300,6 +299,9 @@ SleepThreadUntil (FadeScreen (FadeAllToBlack, TimeOut)); if (TimeOut == ONE_SECOND / 8) SleepThread (ONE_SECOND * 3); + + pMS->CurFrame = CaptureDrawable (LoadGraphic (RESTART_PMAP_ANIM)); + DrawRestartMenuGraphic (pMS); GLOBAL (CurrentActivity) &= ~CHECK_ABORT; SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN, MENU_SOUND_SELECT); @@ -314,7 +316,9 @@ } Flash_terminate (pMS->flashContext); + pMS->flashContext = 0; DestroyDrawable (ReleaseDrawable (pMS->CurFrame)); + pMS->CurFrame = 0; if (GLOBAL (CurrentActivity) == (ACTIVITY)~0) return (FALSE); // timed out This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |