]> granicus.if.org Git - handbrake/commitdiff
MacGui: properly remove an observer.
authorDamiano Galassi <damiog@gmail.com>
Sun, 1 Sep 2019 07:12:27 +0000 (09:12 +0200)
committerDamiano Galassi <damiog@gmail.com>
Sun, 1 Sep 2019 07:12:27 +0000 (09:12 +0200)
macosx/HBSummaryViewController.m
macosx/HBTitle.m

index a62f9d8e9c4ba672ffe95dca71f52c3ffce33ac0..eff36e1fa9f2acfe29c5ab3947ee00c93a5f794e 100644 (file)
@@ -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];
index 78bb097ae5b1486fc06b585b172d776e38144ba7..dbb52a080f9ea4357c705076605b64c1539d0d2a 100644 (file)
@@ -401,7 +401,6 @@ fail:
     return _hb_title->crop[3];
 }
 
-
 - (NSArray<HBTitleAudioTrack *> *)audioTracks
 {
     if (!_audioTracks)