diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs index 6cddd2707..7c60d1e86 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs @@ -322,7 +322,16 @@ namespace HandBrake.ApplicationServices.Services {
XmlSerializer serializer = new XmlSerializer(typeof(List<QueueTask>));
- List<QueueTask> list = serializer.Deserialize(strm) as List<QueueTask>;
+ List<QueueTask> list;
+
+ try
+ {
+ list = serializer.Deserialize(strm) as List<QueueTask>;
+ }
+ catch (Exception exc)
+ {
+ throw new GeneralApplicationException("Unable to restore queue file.", "The file may be corrupted or from an older incompatible version of HandBrake", exc);
+ }
if (list != null)
foreach (QueueTask item in list)
|