Commit bd205baa authored by gogerald's avatar gogerald Committed by Commit Bot

[Payments] Prevent nullptr dereference

Bug: 853950
Change-Id: I39129f9adb62ca3a0298fc20cb60751959e4ebdd
Reviewed-on: https://chromium-review.googlesource.com/1110343
Commit-Queue: Ganggui Tang <gogerald@chromium.org>
Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569364}
parent 13e0e6f4
......@@ -449,7 +449,7 @@ void PaymentManifestParser::OnWebAppParseInstallationInfo(
std::unique_ptr<base::Value> value) {
// TODO(crbug.com/782270): Move this function into a static function for unit
// test.
if (value->FindKey({kServiceWorker}) == nullptr) {
if (!value || value->FindKey({kServiceWorker}) == nullptr) {
return std::move(callback).Run(nullptr, nullptr);
}
......
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