Commit 40125802 authored by Zhiyuan Cai's avatar Zhiyuan Cai Committed by Chromium LUCI CQ

Verify shoppingPersistedTabData not null before calling its method

Bug: 1162451
Change-Id: I568b095600b8268bc461e0c02ec918cb1e6dcc91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2606352Reviewed-by: default avatarDavid Maunder <davidjm@chromium.org>
Reviewed-by: default avatarYue Zhang <yuezhanggg@chromium.org>
Commit-Queue: Zhiyuan Cai <zhiyuancai@google.com>
Cr-Commit-Position: refs/heads/master@{#839767}
parent 17b0f623
......@@ -223,7 +223,8 @@ class TabGridViewBinder {
if (model.get(TabProperties.SHOPPING_PERSISTED_TAB_DATA_FETCHER) != null) {
model.get(TabProperties.SHOPPING_PERSISTED_TAB_DATA_FETCHER)
.fetch((shoppingPersistedTabData) -> {
if (shoppingPersistedTabData.getPriceDrop() == null) {
if (shoppingPersistedTabData == null
|| shoppingPersistedTabData.getPriceDrop() == null) {
priceCardView.setVisibility(View.GONE);
model.set(TabProperties.PRICE_DROP, null);
} else {
......
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