summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <sr55.hb@outlook.com>2013-07-30 17:54:38 +0000
committersr55 <sr55.hb@outlook.com>2013-07-30 17:54:38 +0000
commit1ccc3bb50f1776015612f100e7d4fec6993dc052 (patch)
treeb9fd53488413f47448f1567ed304479c78f4a75f /win
parentcfa6938b4b37d6ab06b551c3bf5624372ccf16f8 (diff)
WinGui: Setting the Initial Directory to null when we can't resolve a full path to see if it helps an intermittent crash some users seem to see on the Browse Destination Dialog.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5676 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 474185776..0fea49d58 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1418,10 +1418,9 @@ namespace HandBrakeWPF.ViewModels
if (this.CurrentTask != null && !string.IsNullOrEmpty(this.CurrentTask.Destination))
{
- if (Directory.Exists(Path.GetDirectoryName(this.CurrentTask.Destination)))
- {
- saveFileDialog.InitialDirectory = Path.GetDirectoryName(this.CurrentTask.Destination) + "\\";
- }
+ saveFileDialog.InitialDirectory = Directory.Exists(Path.GetDirectoryName(this.CurrentTask.Destination))
+ ? Path.GetDirectoryName(this.CurrentTask.Destination) + "\\"
+ : null;
saveFileDialog.FileName = Path.GetFileName(this.CurrentTask.Destination);
}