diff options
author | Damiano Galassi <[email protected]> | 2015-09-29 19:46:41 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2015-09-29 19:46:41 +0200 |
commit | c7ba32bd781b0ac0dd9073b2bcfb1aa8fc67c95f (patch) | |
tree | bfad822d7aa3d1af6bed10882594ea32e6e9ee12 | |
parent | bee2af0f25eafef22154808af7d102d079762122 (diff) |
MacGui: safer HBTitle by checking init, and use a weak property for title in HBJob
-rw-r--r-- | macosx/HBJob.h | 2 | ||||
-rw-r--r-- | macosx/HBTitle.m | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/macosx/HBJob.h b/macosx/HBJob.h index 5808320cd..73779ecee 100644 --- a/macosx/HBJob.h +++ b/macosx/HBJob.h @@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, HBJobState){ /// Current state of the job. @property (nonatomic, readwrite) HBJobState state; -@property (nonatomic, readwrite, assign, nullable) HBTitle *title; +@property (nonatomic, readwrite, weak, nullable) HBTitle *title; @property (nonatomic, readonly) int titleIdx; @property (nonatomic, readwrite, copy) NSString *presetName; diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m index ad926e0cd..47b4a98ae 100644 --- a/macosx/HBTitle.m +++ b/macosx/HBTitle.m @@ -45,11 +45,11 @@ extern NSString *keySubTrackSrtCharCode; @implementation HBTitle -/*- (instancetype)init +- (instancetype)init { NSAssert(false, @"[HBTitle init] should not be called"); return nil; -}*/ +} - (instancetype)initWithTitle:(hb_title_t *)title featured:(BOOL)featured { |