From a43e4ae45a1d4f9fa4187390cc8bcac14c2ca1b4 Mon Sep 17 00:00:00 2001 From: Laurin Quast Date: Mon, 18 Jun 2018 10:23:41 +0200 Subject: [PATCH] prevent crash fixes #907 --- ios/RCTVideo.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/RCTVideo.m b/ios/RCTVideo.m index 0f1227b11b..5fe6abe5f2 100644 --- a/ios/RCTVideo.m +++ b/ios/RCTVideo.m @@ -732,7 +732,9 @@ - (void)setProgressUpdateInterval:(float)progressUpdateInterval - (void)removePlayerLayer { [_playerLayer removeFromSuperlayer]; - [_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath]; + @try { + [_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath]; + } @catch (NSException *e) { } _playerLayer = nil; }