From 1ccc3bb50f1776015612f100e7d4fec6993dc052 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 30 Jul 2013 17:54:38 +0000 Subject: 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 --- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 7 +++---- 1 file 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); } -- cgit v1.2.3