From 3d40935cc192a95331e7a002f272eb8bca8df5b9 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Mon, 3 Sep 2018 18:30:19 -0700 Subject: [PATCH] Revert crash fix when removing player layer observer Couldn't figure out how this was happening, so I don't want to hide it with try/catch. Let's get it fixed instead. --- ios/RCTVideo.m | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ios/RCTVideo.m b/ios/RCTVideo.m index e4548e72..0f1227b1 100644 --- a/ios/RCTVideo.m +++ b/ios/RCTVideo.m @@ -732,10 +732,7 @@ static NSString *const timedMetadata = @"timedMetadata"; - (void)removePlayerLayer { [_playerLayer removeFromSuperlayer]; - @try{ - [_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath]; - }@catch (NSException * e) { - } + [_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath]; _playerLayer = nil; } @@ -826,10 +823,7 @@ static NSString *const timedMetadata = @"timedMetadata"; { [_player pause]; if (_playbackRateObserverRegistered) { - @try{ - [_player removeObserver:self forKeyPath:playbackRate context:nil]; - }@catch (NSException * e) { - } + [_player removeObserver:self forKeyPath:playbackRate context:nil]; _playbackRateObserverRegistered = NO; } _player = nil;