]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Fri, 21 Jan 2011 21:55:13 +0000 (21:55 +0000)
committersr55 <sr55.hb@outlook.com>
Fri, 21 Jan 2011 21:55:13 +0000 (21:55 +0000)
- Fix a possible exception in the CLI detection code.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3763 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Program.cs

index 744e46f2173b1e533cf05dbf220272c4461b6493..d8012932236bcb3d9568664755eb29d111fbdf91 100644 (file)
@@ -35,22 +35,7 @@ namespace Handbrake
             // Handle any unhandled exceptions\r
             AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException;\r
 \r
-            // Attempt to upgrade / keep the users settings between versions\r
-            if (Settings.Default.UpdateRequired)\r
-            {\r
-                Settings.Default.Upgrade();\r
-                // Reset some settings\r
-                Settings.Default.UpdateRequired = false;\r
-                Settings.Default.CliExeHash = null;\r
-                Settings.Default.hb_build = 0;\r
-                Settings.Default.hb_platform = null;\r
-                Settings.Default.hb_version = null;\r
-\r
-                // Re-detect the CLI version data.\r
-                Functions.Main.SetCliVersionData();\r
-            }\r
-\r
-            // Make sure we have any pre-requesits before trying to launch\r
+            // Check that HandBrakeCLI is availabl.\r
             string failedInstall = "HandBrake is not installed properly. Please reinstall HandBrake. \n\n";\r
             string missingFiles = string.Empty;\r
 \r
@@ -70,6 +55,21 @@ namespace Handbrake
                 return;\r
             }\r
 \r
+            // Attempt to upgrade / keep the users settings between versions\r
+            if (Settings.Default.UpdateRequired)\r
+            {\r
+                Settings.Default.Upgrade();\r
+                // Reset some settings\r
+                Settings.Default.UpdateRequired = false;\r
+                Settings.Default.CliExeHash = null;\r
+                Settings.Default.hb_build = 0;\r
+                Settings.Default.hb_platform = null;\r
+                Settings.Default.hb_version = null;\r
+\r
+                // Re-detect the CLI version data.\r
+                Functions.Main.SetCliVersionData();\r
+            }\r
+\r
             // Check were not running on a screen that's going to cause some funnies to happen.\r
             Screen scr = Screen.PrimaryScreen;\r
             if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))\r