From 2cda3db7473c5751a9e785269ad43a76bbc34de6 Mon Sep 17 00:00:00 2001
From: Damiano Galassi <damiog@gmail.com>
Date: Fri, 21 Apr 2017 13:48:25 +0200
Subject: MacGui: do not load a job from disk if one or more job objects are
 missing.

---
 macosx/HBSubtitles.m | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'macosx/HBSubtitles.m')

diff --git a/macosx/HBSubtitles.m b/macosx/HBSubtitles.m
index f0d224078..235ceec1e 100644
--- a/macosx/HBSubtitles.m
+++ b/macosx/HBSubtitles.m
@@ -513,9 +513,12 @@ extern NSString *keySubTrackSrtFileURLBookmark;
         track.delegate = self;
     }
 
-    decodeObject(_defaults, HBSubtitlesDefaults);
+    decodeObjectOrFail(_defaults, HBSubtitlesDefaults);
 
     return self;
+
+fail:
+    return nil;
 }
 
 #pragma mark - Presets
-- 
cgit v1.2.3