project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 5370 a3f87be7b09a
parent 5224 6e8fbbfb0de5
child 5662 99083392cd4f
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sun Jul 03 01:10:39 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sun Jul 03 02:33:17 2011 +0200
@@ -183,8 +183,7 @@
 
     // release the network manager and the savepath as they are not needed anymore
     releaseAndNil(self.engineProtocol);
-    if (self.gameType != gtSave)
-        releaseAndNil(self.savePath);
+    releaseAndNil(self.savePath);
 
     if ([[userDefaults objectForKey:@"music"] boolValue])
         [HedgewarsAppDelegate playBackgroundMusic];
@@ -210,7 +209,7 @@
 // set up variables for a save game
 -(void) startSaveGame:(NSString *)atPath {
     self.gameType = gtSave;
-    self.savePath = atPath;
+    self.savePath = [atPath retain];
 
     [self.engineProtocol spawnThread:self.savePath];
     [self prepareEngineLaunch];