Skip to content

Commit

Permalink
Standalone: fixed crash when attempting to restart at launch panel in…
Browse files Browse the repository at this point in the history
… single-launcher app.

This was occurring when resetting game data in a single-launcher app,
where the app attempts to restart itself at the launch panel but then
dies because the launch panel is unavailable.
  • Loading branch information
alunbestor committed Dec 6, 2015
1 parent 508a7fa commit e989173
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Boxer/BXSession.m
Expand Up @@ -311,10 +311,25 @@ - (BOOL) readFromURL: (NSURL *)absoluteURL
//Check if the user opened the gamebox itself or a specific file/folder inside the gamebox.
BOOL hasCustomTarget = ![self.targetURL isEqual: gameboxURL];

//Check if we are flagged to show the launch panel at startup for this game (instead of looking for a target program.)
BOOL startWithLaunchPanel = [[self.gameSettings objectForKey: BXGameboxSettingsShowLaunchPanelKey] boolValue];
BOOL alwaysStartWithLaunchPanel = [[self.gameSettings objectForKey: BXGameboxSettingsAlwaysShowLaunchPanelKey] boolValue];
if (alwaysStartWithLaunchPanel) startWithLaunchPanel = YES;
//Check if we are flagged to show the launch panel at startup for this game,
//instead of looking for a target program.
BOOL startWithLaunchPanel;
if (self.allowsLauncherPanel)
{
BOOL alwaysStartWithLaunchPanel = [self.gameSettings[BXGameboxSettingsAlwaysShowLaunchPanelKey] boolValue];
if (alwaysStartWithLaunchPanel)
{
startWithLaunchPanel = YES;
}
else
{
startWithLaunchPanel = [self.gameSettings[BXGameboxSettingsShowLaunchPanelKey] boolValue];
}
}
else
{
startWithLaunchPanel = NO;
}

//If the user opened the gamebox itself instead of a specific file inside it,
//and we're not flagged to show the launch panel in this situation, then try
Expand Down

0 comments on commit e989173

Please sign in to comment.