You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2018/12/17 03:11:40 UTC

[incubator-weex] branch master updated: [core] fix crash when vnode is null (#1918)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new cb44e2f  [core] fix crash when vnode is null (#1918)
cb44e2f is described below

commit cb44e2f28801c00009d8cfe142a5cec4fc07a409
Author: jianhan-he <41...@users.noreply.github.com>
AuthorDate: Mon Dec 17 11:11:36 2018 +0800

    [core] fix crash when vnode is null (#1918)
---
 weex_core/Source/core/data_render/vnode/vnode_render_manager.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/weex_core/Source/core/data_render/vnode/vnode_render_manager.cc b/weex_core/Source/core/data_render/vnode/vnode_render_manager.cc
index 3dad81b..eb016cb 100644
--- a/weex_core/Source/core/data_render/vnode/vnode_render_manager.cc
+++ b/weex_core/Source/core/data_render/vnode/vnode_render_manager.cc
@@ -515,6 +515,10 @@ void UpdateChildren(const string& page_id, VNode* old_node, VNode* new_node) {
     } else if (old_end_node == nullptr) {
       old_end_node = GetOrNull(old_children, --old_end);
 
+    } else if (new_start_node == nullptr) {
+      new_start_node = GetOrNull(new_children, ++new_start);
+    } else if (new_end_node == nullptr) {
+      new_end_node = GetOrNull(new_children, --new_end);
     } else if (SameNode(old_start_node, new_start_node)) {
       PatchVNode(page_id, old_start_node, new_start_node);
       old_start_node = GetOrNull(old_children, ++old_start);