From 9cea15ee7432dd3d4c3bba24b4861143243195d7 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Sat, 4 Jul 2015 16:43:58 +0000 Subject: [PATCH] =?utf8?q?MacGui:=20fixed=20a=20crash=20that=20could=20hap?= =?utf8?q?pen=20when=20the=20"browse=E2=80=A6"=20button=20is=20pressed=20i?= =?utf8?q?f=20the=20destination=20field=20is=20empty.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7340 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/macosx/HBController.m b/macosx/HBController.m index d5599e899..51b7c503f 100644 --- a/macosx/HBController.m +++ b/macosx/HBController.m @@ -756,8 +756,12 @@ { // Open a panel to let the user choose and update the text field NSSavePanel *panel = [NSSavePanel savePanel]; - panel.directoryURL = self.job.destURL.URLByDeletingLastPathComponent; - panel.nameFieldStringValue = self.job.destURL.lastPathComponent; + + if (self.job.destURL) + { + panel.directoryURL = self.job.destURL.URLByDeletingLastPathComponent; + panel.nameFieldStringValue = self.job.destURL.lastPathComponent; + } [panel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) { -- 2.40.0