]> granicus.if.org Git - handbrake/commitdiff
MacGui: fixed a crash that could happen when the "browse…" button is pressed if the...
authorritsuka <damiog@gmail.com>
Sat, 4 Jul 2015 16:43:58 +0000 (16:43 +0000)
committerritsuka <damiog@gmail.com>
Sat, 4 Jul 2015 16:43:58 +0000 (16:43 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7340 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/HBController.m

index d5599e899ff7f7f759b3529e218a978a1e3c1b2a..51b7c503f3f37aa0a81899e3fdebe8463df96d91 100644 (file)
 {
     // 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)
      {