You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by cx...@apache.org on 2017/03/02 03:46:15 UTC
incubator-weex git commit: * [ios] crash protect for animationDidStart
Repository: incubator-weex
Updated Branches:
refs/heads/0.11-dev dd69c0588 -> 697c0f5fb
* [ios] crash protect for animationDidStart
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/697c0f5f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/697c0f5f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/697c0f5f
Branch: refs/heads/0.11-dev
Commit: 697c0f5fb14ae6820cf0fa398b171b82d9a276d7
Parents: dd69c05
Author: cxfeng <cx...@gmail.com>
Authored: Thu Mar 2 11:42:43 2017 +0800
Committer: cxfeng <cx...@gmail.com>
Committed: Thu Mar 2 11:42:43 2017 +0800
----------------------------------------------------------------------
ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/697c0f5f/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
index c1fea40..81e888a 100644
--- a/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
+++ b/ios/sdk/WeexSDK/Sources/Module/WXAnimationModule.m
@@ -73,6 +73,10 @@
- (void)animationDidStart:(CAAnimation *)anim
{
+ if (!_animationInfo.target || ![_animationInfo.target isViewLoaded]) {
+ return;
+ }
+
if ([_animationInfo.propertyName hasPrefix:@"transform"]) {
WXTransform *transform = _animationInfo.target->_transform;
[transform applyTransformForView:_animationInfo.target.view];