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 committed Feb 8, 2018
1 parent 82cfdeb commit 511c73e
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 @@ -756,9 +756,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

2 comments on commit 511c73e

@franzejr
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @ardalahmet can you create a PR for this ?

@ahmetardal
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.