Skip to content

Commit

Permalink
Fix(ios): crash in removePlayerLayer keyPath observer (TheWidlarzGrou…
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetardal authored and jaybo committed Apr 28, 2018
1 parent 4c31d08 commit 89e5c7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ios/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,13 @@ - (void)setProgressUpdateInterval:(float)progressUpdateInterval

- (void)removePlayerLayer
{
[_playerLayer removeFromSuperlayer];
[_playerLayer removeFromSuperlayer];

@try {
[_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
_playerLayer = nil;
} @catch (NSException *e) { }

_playerLayer = nil;
}

#pragma mark - RCTVideoPlayerViewControllerDelegate
Expand Down

0 comments on commit 89e5c7b

Please sign in to comment.