Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[iOS] Fix rtl layout crash related to accessing wild pointer in BFSs …
Browse files Browse the repository at this point in the history
…vector. (#2525)
  • Loading branch information
wqyfavor authored and jianhan-he committed Jun 10, 2019
1 parent 223d05f commit 0baa6a7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions weex_core/Source/core/layout/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 0baa6a7

Please sign in to comment.