Commit 4210ef11 authored by Shu Chen's avatar Shu Chen Committed by Leo Zhang

Add null check on the history_prune_re_ to avoid crash.

Bug: 859432
Change-Id: I2fb4b30fffac5db5c2d5a31e7bf96b74e2bcbc89
Reviewed-on: https://chromium-review.googlesource.com/c/1317074Reviewed-by: default avatarLeo Zhang <googleo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605509}
parent 070ceff1
......@@ -335,6 +335,8 @@ bool RulesData::Transform(const std::string& context,
}
bool RulesData::MatchHistoryPrune(const std::string& str) const {
if (!history_prune_re_)
return false;
return re2::RE2::FullMatch(str, *history_prune_re_);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment