summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorDamiano Galassi <[email protected]>2019-09-01 09:12:27 +0200
committerDamiano Galassi <[email protected]>2019-09-01 09:12:27 +0200
commitb4dbb30c9d87530755a6c4f9d0b4284a7e43296c (patch)
treef774b3b5d93ea9a8c2fa74b793eedfb3864b676a /macosx
parent5eede914b207d91c5348777a88c8099b2bed8fd8 (diff)
MacGui: properly remove an observer.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBSummaryViewController.m6
-rw-r--r--macosx/HBTitle.m1
2 files changed, 6 insertions, 1 deletions
diff --git a/macosx/HBSummaryViewController.m b/macosx/HBSummaryViewController.m
index a62f9d8e9..eff36e1fa 100644
--- a/macosx/HBSummaryViewController.m
+++ b/macosx/HBSummaryViewController.m
@@ -54,6 +54,12 @@ static void *HBSummaryViewControllerPreferencesContext = &HBSummaryViewControlle
return self;
}
+- (void)dealloc
+{
+ self.job = nil;
+ [NSUserDefaultsController.sharedUserDefaultsController removeObserver:self forKeyPath:@"values.HBShowSummaryPreview" context:HBSummaryViewControllerPreferencesContext];
+}
+
- (void)viewDidLoad
{
[super viewDidLoad];
diff --git a/macosx/HBTitle.m b/macosx/HBTitle.m
index 78bb097ae..dbb52a080 100644
--- a/macosx/HBTitle.m
+++ b/macosx/HBTitle.m
@@ -401,7 +401,6 @@ fail:
return _hb_title->crop[3];
}
-
- (NSArray<HBTitleAudioTrack *> *)audioTracks
{
if (!_audioTracks)