diff options
author | Damiano Galassi <[email protected]> | 2016-02-26 10:04:51 +0100 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2016-02-26 10:04:51 +0100 |
commit | c3c1f6b8f4464c98369a2a127f771399d86c25ef (patch) | |
tree | 17054d3952c6ef2516564a5b8d8b64214d094423 /macosx/HBCore.m | |
parent | e06ab1d8cbed41d3adb9181d5e623c51c91a2222 (diff) |
MacGui: make HBCore titles ivar always non null.
Diffstat (limited to 'macosx/HBCore.m')
-rw-r--r-- | macosx/HBCore.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m index 4e084df0b..3c2ac0b8b 100644 --- a/macosx/HBCore.m +++ b/macosx/HBCore.m @@ -45,7 +45,7 @@ static void hb_error_handler(const char *errmsg) @property (nonatomic, readonly) dispatch_queue_t updateTimerQueue; /// Current scanned titles. -@property (nonatomic, readwrite, strong) NSArray<HBTitle *> *titles; +@property (nonatomic, readwrite, copy) NSArray<HBTitle *> *titles; /// Progress handler. @property (nonatomic, readwrite, copy) HBCoreProgressHandler progressHandler; @@ -96,6 +96,8 @@ static void hb_error_handler(const char *errmsg) _name = @"HBCore"; _state = HBStateIdle; _updateTimerQueue = dispatch_queue_create("fr.handbrake.coreQueue", DISPATCH_QUEUE_SERIAL); + _titles = @[]; + _hb_state = malloc(sizeof(struct hb_state_s)); _logLevel = level; @@ -197,7 +199,7 @@ static void hb_error_handler(const char *errmsg) NSAssert(url, @"[HBCore scanURL:] called with nil url."); // Reset the titles array - self.titles = nil; + self.titles = @[]; // Copy the progress/completion blocks self.progressHandler = progressHandler; |