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

jianhan 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 0baa6a7  [iOS] Fix rtl layout crash related to accessing wild pointer 
in BFSs vector. (#2525)
0baa6a7 is described below

commit 0baa6a722e9c289fcf654aa76b92076a13fd1c71
Author: wqyfavor <[email protected]>
AuthorDate: Mon Jun 10 10:35:08 2019 +0800

    [iOS] Fix rtl layout crash related to accessing wild pointer in BFSs 
vector. (#2525)
---
 weex_core/Source/core/layout/layout.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/weex_core/Source/core/layout/layout.h 
b/weex_core/Source/core/layout/layout.h
index 8a1e97b..d552063 100644
--- a/weex_core/Source/core/layout/layout.h
+++ b/weex_core/Source/core/layout/layout.h
@@ -717,6 +717,15 @@ namespace WeexCore {
           break;
         }
       }
+      
+      // also remove from BFC list, for determineChildLayoutDirection may 
encounter a wild pointer
+      for (int index = 0; index < BFCs.size(); index++) {
+          if (child == BFCs[index]) {
+              BFCs.erase(BFCs.begin() + index);
+              break;
+          }
+      }
+      
       markDirty();
     }
 

Reply via email to