diff options
Diffstat (limited to 'macosx/HBPlayerHUDController.m')
-rw-r--r-- | macosx/HBPlayerHUDController.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/macosx/HBPlayerHUDController.m b/macosx/HBPlayerHUDController.m index 03eed5a84..ebafc95c1 100644 --- a/macosx/HBPlayerHUDController.m +++ b/macosx/HBPlayerHUDController.m @@ -61,6 +61,8 @@ { [self.player removeRateObserver:self.rateObserver]; [self.player removeTimeObserver:self.periodicObserver]; + self.rateObserver = nil; + self.periodicObserver = nil; [self _clearTracksMenu]; } @@ -100,7 +102,16 @@ - (void)dealloc { - // Remove observers + if (_rateObserver) + { + [_player removeRateObserver:_rateObserver]; + _rateObserver = nil; + } + if (_periodicObserver) + { + [_player removeTimeObserver:_periodicObserver]; + _periodicObserver = nil; + } } #pragma mark - Audio and subtitles selection menu |