summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-07-04 16:43:58 +0000
committerritsuka <[email protected]>2015-07-04 16:43:58 +0000
commit9cea15ee7432dd3d4c3bba24b4861143243195d7 (patch)
tree6074a881379c611d8bcfd2de2519554b5160a04e
parentb3e5779d36d465fc660676bd5553e3c1ac120981 (diff)
MacGui: fixed a crash that could happen when the "browse…" button is pressed if the destination field is empty.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7340 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/HBController.m8
1 files 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)
{