mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-07 02:08:34 +08:00
fix crash on reload during animation
Summary: closes #11719 **Test plan (required)** Cmd+r during native animation in uiexplorer Closes https://github.com/facebook/react-native/pull/11720 Differential Revision: D4386449 fbshipit-source-id: a7b5ea2c77de260e8b95b5983438f9cef4d1d752
This commit is contained in:
committed by
Facebook Github Bot
parent
07a2a71df3
commit
e8a45c96a7
@@ -321,7 +321,14 @@
|
||||
|
||||
- (void)stopAnimationLoopIfNeeded
|
||||
{
|
||||
if (_displayLink && _activeAnimations.count == 0) {
|
||||
if (_activeAnimations.count == 0) {
|
||||
[self stopAnimationLoop];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)stopAnimationLoop
|
||||
{
|
||||
if (_displayLink) {
|
||||
[_displayLink invalidate];
|
||||
_displayLink = nil;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user