summaryrefslogtreecommitdiffstats
path: root/macosx/HBController.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2016-01-28 07:32:16 +0100
committerDamiano Galassi <[email protected]>2016-01-28 07:32:16 +0100
commita37f528f742c2b27db3995c7b22147d9ef4d7049 (patch)
tree30e407ff65c15012425ba0f5379bde8d5a53634d /macosx/HBController.m
parentaa9e61d194f5b2a9f54f49067eb85d2655feb20d (diff)
MacGui: fix some static anaylizer warnings.
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];
+ }
}
}