diff --git a/Sledge.Editor/Editor.cs b/Sledge.Editor/Editor.cs index ce153ed1a..f39114b77 100644 --- a/Sledge.Editor/Editor.cs +++ b/Sledge.Editor/Editor.cs @@ -577,26 +577,26 @@ private void CompileFinished(Batch batch) { return; } - var exe = batch.Game.GetExecutable(); - if (!File.Exists(exe)) - { - MessageBox.Show( - "The location of the game executable is incorrect. Please ensure that the game configuration has been set up correctly.", - "Failed to launch!", MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } + } + var exe = batch.Game.GetExecutable(); + if (!File.Exists(exe)) + { + MessageBox.Show( + "The location of the game executable is incorrect. Please ensure that the game configuration has been set up correctly.", + "Failed to launch!", MessageBoxButtons.OK, MessageBoxIcon.Error); + return; + } - var flags = String.Format("{0} +map \"{1}\" {2}", batch.Game.GetGameLaunchArgument(), batch.MapFileName, batch.Game.ExecutableParameters); - try - { - Process.Start(exe, flags); - } - catch (Exception ex) - { - MessageBox.Show("Launching game failed: " + ex.Message, "Failed to launch!", - MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } + var flags = String.Format("{0} +map \"{1}\" {2}", batch.Game.GetGameLaunchArgument(), batch.MapFileName, batch.Game.ExecutableParameters); + try + { + Process.Start(exe, flags); + } + catch (Exception ex) + { + MessageBox.Show("Launching game failed: " + ex.Message, "Failed to launch!", + MessageBoxButtons.OK, MessageBoxIcon.Error); + return; } } }