fix crash when showing stats screen

This commit is contained in:
nehalmistry 2004-08-29 15:59:37 +00:00
parent fee46e9fe9
commit 2d120522e1

View file

@ -1210,10 +1210,12 @@ void ShowStats(void)
if (GameResult == GameVictory) {
if (TheUI.VictoryBackgroundG) {
LoadGraphic(TheUI.VictoryBackgroundG);
background = TheUI.VictoryBackgroundG;
}
} else {
if (TheUI.DefeatBackgroundG) {
LoadGraphic(TheUI.DefeatBackgroundG);
background = TheUI.DefeatBackgroundG;
}
}
ResizeGraphic(background, VideoWidth, VideoHeight);
@ -1248,8 +1250,6 @@ void ShowStats(void)
++frame;
}
FreeGraphic(background);
VideoSyncSpeed = old_video_sync;
SetVideoSync();
}