You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/04/24 09:33:44 UTC

[26/51] [abbrv] incubator-weex git commit: * [ios] protect nil object in array

* [ios] protect nil object in array


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/fee493bc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/fee493bc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/fee493bc

Branch: refs/heads/0.13-dev
Commit: fee493bcd26c7c91b0c42b9b842079e6598145f0
Parents: c4afacb
Author: acton393 <zh...@gmail.com>
Authored: Fri Apr 21 16:32:21 2017 +0800
Committer: acton393 <zh...@gmail.com>
Committed: Fri Apr 21 16:32:21 2017 +0800

----------------------------------------------------------------------
 ios/sdk/WeexSDK/Sources/Component/WXListComponent.m | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/fee493bc/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
----------------------------------------------------------------------
diff --git a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
index add07dd..e1a9d54 100644
--- a/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
+++ b/ios/sdk/WeexSDK/Sources/Component/WXListComponent.m
@@ -823,6 +823,9 @@
 
 - (void)_deleteTableViewCellAtIndexPath:(NSIndexPath *)indexPath keepScrollPosition:(BOOL)keepScrollPosition animation:(UITableViewRowAnimation)animation
 {
+    if (!indexPath) {
+        return ;
+    }
     [self _performUpdates:^{
         [_tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:animation];
     } withKeepScrollPosition:keepScrollPosition adjustmentBlock:^CGFloat(NSIndexPath *top) {