summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-05-21 19:55:50 +0000
committersr55 <[email protected]>2011-05-21 19:55:50 +0000
commitaf4123faa1127aa0d9a9a14d86855dd167ef1cd6 (patch)
tree484f0b69448f22a2cf9a1f7f3b56ca6ebe04b2f2 /win/CS/HandBrake.ApplicationServices/Services
parentfb7bb978eaca70d39b18d555970ee33496e73a8b (diff)
WinGui: Fix a Serialization issue that was causing the Winforms designer to trip up when loading the main form.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3990 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/PresetService.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
index 227a6eef6..677504253 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/PresetService.cs
@@ -267,8 +267,20 @@ namespace HandBrake.ApplicationServices.Services
this.presets.Add(newPreset);
}
}
+
+ // Verify we have presets.
+ if (this.presets.Count == 0)
+ {
+ throw new GeneralApplicationException("Failed to load built-in presets.", "Restarting HandBrake may resolve this issue", null);
+ }
+
presetInput.Close();
presetInput.Dispose();
+ }
+ else
+ {
+ // Something really bad must have happened if the file is missing.
+ throw new GeneralApplicationException("Preset Export Failed. Unable to load in Presets.", "Please restart HandBrake", null);
}
// Finally, Create a new or update the current Presets.xml file