diff options
author | sr55 <[email protected]> | 2014-02-17 20:30:04 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-02-17 20:30:04 +0000 |
commit | 6ac0f1f45d334382b62605db96ea45a81d773aa6 (patch) | |
tree | 2d436f808b7961af3343838ebd36399b865592a6 /win/CS/HandBrake.ApplicationServices/Services | |
parent | d4327b0f304b99a7650b12622b48e6145794ab65 (diff) |
WinGui: Show a error message when the user has no destination set.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6037 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/LibScan.cs | 12 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 203459e9c..f7d07efb2 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -261,7 +261,17 @@ namespace HandBrake.ApplicationServices.Services }
EncodeJob encodeJob = InteropModelCreator.GetEncodeJob(job);
- BitmapImage bitmapImage = this.instance.GetPreview(encodeJob, preview);
+
+ BitmapImage bitmapImage = null;
+ try
+ {
+ bitmapImage = this.instance.GetPreview(encodeJob, preview);
+ }
+ catch (AccessViolationException e)
+ {
+ Console.WriteLine(e);
+ }
+
return bitmapImage;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index 43c11a9bf..fd08f6408 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -220,7 +220,7 @@ namespace HandBrake.ApplicationServices.Services /// </returns>
public bool CheckForDestinationPathDuplicates(string destination)
{
- return this.queue.Any(job => job.Task != null && job.Task.Destination.Contains(destination.Replace("\\\\", "\\")));
+ return this.queue.Any(job => job.Task != null && job.Task.Destination != null && job.Task.Destination.Contains(destination.Replace("\\\\", "\\")));
}
/// <summary>
|