summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2021-05-11 21:05:42 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-05-11 21:05:42 +0000
commit30f6ef3a7b6408df40c7ad77aeecf6acd9b808d6 (patch)
tree362968d1ef2e507ef434ed40a2462a7c51f1022d
parentcc3c259e526e7839fccd91a0090e1516b5e7da28 (diff)
parent3965584d3a988e9a551ce0d96812f3923e01b0b5 (diff)
Merge "Fix segmentation fault in aapt2" into sc-dev
-rw-r--r--tools/aapt2/dump/DumpManifest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/aapt2/dump/DumpManifest.cpp b/tools/aapt2/dump/DumpManifest.cpp
index 61ba09b6a3c9..f2c6b15bc0cd 100644
--- a/tools/aapt2/dump/DumpManifest.cpp
+++ b/tools/aapt2/dump/DumpManifest.cpp
@@ -135,7 +135,8 @@ class ManifestExtractor {
template <typename Predicate>
void Filter(Predicate&& func) {
children_.erase(std::remove_if(children_.begin(), children_.end(),
- [&](const auto& e) { return func(e.get()); }));
+ [&](const auto& e) { return func(e.get()); }),
+ children_.end());
}
/** Retrieves the list of children of the element. */