summaryrefslogtreecommitdiffstats
path: root/macosx/HBVideo.m
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2017-04-21 13:48:25 +0200
committerDamiano Galassi <[email protected]>2017-04-21 13:50:48 +0200
commit2cda3db7473c5751a9e785269ad43a76bbc34de6 (patch)
treecb6d21aca3679a7d66a39100f4c6eaa8d87eb449 /macosx/HBVideo.m
parentbc092457f1409c7d014bbdd3fbd65db0340244bf (diff)
MacGui: do not load a job from disk if one or more job objects are missing.
Diffstat (limited to 'macosx/HBVideo.m')
-rw-r--r--macosx/HBVideo.m13
1 files changed, 8 insertions, 5 deletions
diff --git a/macosx/HBVideo.m b/macosx/HBVideo.m
index 5cb7d642d..21716b0bf 100644
--- a/macosx/HBVideo.m
+++ b/macosx/HBVideo.m
@@ -516,18 +516,21 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
decodeBool(_turboTwoPass);
decodeBool(_advancedOptions);
- decodeObject(_preset, NSString);
- decodeObject(_tune, NSString);
- decodeObject(_profile, NSString);
- decodeObject(_level, NSString);
+ decodeObjectOrFail(_preset, NSString);
+ decodeObjectOrFail(_tune, NSString);
+ decodeObjectOrFail(_profile, NSString);
+ decodeObjectOrFail(_level, NSString);
- decodeObject(_videoOptionExtra, NSString);
+ decodeObjectOrFail(_videoOptionExtra, NSString);
decodeBool(_fastDecode);
_notificationsEnabled = YES;
return self;
+
+fail:
+ return nil;
}
#pragma mark - Various conversion methods from dict/preset/queue/etc