summaryrefslogtreecommitdiffstats
path: root/macosx/HBController.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBController.m')
-rw-r--r--macosx/HBController.m11
1 files changed, 7 insertions, 4 deletions
diff --git a/macosx/HBController.m b/macosx/HBController.m
index 94f626b7f..923256a45 100644
--- a/macosx/HBController.m
+++ b/macosx/HBController.m
@@ -845,7 +845,7 @@
{
[self updateFileExtension:nil];
- if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultAutoNaming"])
+ if ([[NSUserDefaults standardUserDefaults] boolForKey:@"DefaultAutoNaming"] && self.job)
{
// Generate a new file name
NSString *fileName = [HBUtilities automaticNameForJob:self.job];
@@ -858,10 +858,13 @@
- (void)updateFileExtension:(NSNotification *)notification
{
- NSString *extension = [HBUtilities automaticExtForJob:self.job];
- if (![extension isEqualTo:self.job.destURL.pathExtension])
+ if (self.job)
{
- self.job.destURL = [[self.job.destURL URLByDeletingPathExtension] URLByAppendingPathExtension:extension];
+ NSString *extension = [HBUtilities automaticExtForJob:self.job];
+ if (![extension isEqualTo:self.job.destURL.pathExtension])
+ {
+ self.job.destURL = [[self.job.destURL URLByDeletingPathExtension] URLByAppendingPathExtension:extension];
+ }
}
}