project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6365 c992df555afb
parent 6353 d8f62c805619
child 6415 af2047bb4f70
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sun Nov 13 14:39:39 2011 -0500
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sun Nov 13 21:18:33 2011 +0100
@@ -89,8 +89,8 @@
     [[OverlayViewController mainOverlay] removeOverlay];
 
     // engine thread *should* be done by now
-    NSArray *stats = self.proto.statsArray;
-    if (stats != nil) {
+    NSArray *stats = [[NSArray alloc] initWithArray:self.proto.statsArray copyItems:YES];
+    if ([HWUtils gameStatus] == gsEnded && stats != nil) {
         StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
         statsPage.statsArray = stats;
         statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
@@ -100,7 +100,7 @@
         [callingController presentModalViewController:statsPage animated:YES];
         [statsPage release];
     }
-    [stats release];    // we retained the array before
+    [stats release];
 
     // can remove the savefile if the replay has ended
     if ([HWUtils gameType] == gtSave)