summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-01-21 21:55:13 +0000
committersr55 <[email protected]>2011-01-21 21:55:13 +0000
commitc3940c57f907e79b07f575ba6105deefd517bab2 (patch)
treeebe9537338e7d1ff09bf8d3b7b3c843861b9cf42
parent5daa72facc91fad3d43ae16d151d737eca3faadb (diff)
WinGui:
- Fix a possible exception in the CLI detection code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3763 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Program.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs
index 744e46f21..d80129322 100644
--- a/win/C#/Program.cs
+++ b/win/C#/Program.cs
@@ -35,22 +35,7 @@ namespace Handbrake
// Handle any unhandled exceptions
AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException;
- // Attempt to upgrade / keep the users settings between versions
- if (Settings.Default.UpdateRequired)
- {
- Settings.Default.Upgrade();
- // Reset some settings
- Settings.Default.UpdateRequired = false;
- Settings.Default.CliExeHash = null;
- Settings.Default.hb_build = 0;
- Settings.Default.hb_platform = null;
- Settings.Default.hb_version = null;
-
- // Re-detect the CLI version data.
- Functions.Main.SetCliVersionData();
- }
-
- // Make sure we have any pre-requesits before trying to launch
+ // Check that HandBrakeCLI is availabl.
string failedInstall = "HandBrake is not installed properly. Please reinstall HandBrake. \n\n";
string missingFiles = string.Empty;
@@ -70,6 +55,21 @@ namespace Handbrake
return;
}
+ // Attempt to upgrade / keep the users settings between versions
+ if (Settings.Default.UpdateRequired)
+ {
+ Settings.Default.Upgrade();
+ // Reset some settings
+ Settings.Default.UpdateRequired = false;
+ Settings.Default.CliExeHash = null;
+ Settings.Default.hb_build = 0;
+ Settings.Default.hb_platform = null;
+ Settings.Default.hb_version = null;
+
+ // Re-detect the CLI version data.
+ Functions.Main.SetCliVersionData();
+ }
+
// Check were not running on a screen that's going to cause some funnies to happen.
Screen scr = Screen.PrimaryScreen;
if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))