Commit a7e4967c authored by Kevin Strohbehn's avatar Kevin Strohbehn Committed by Commit Bot

Speculative fix for Null-dereference crash

Bug: 936504
Change-Id: I98436eb82c64fe5b3b6ba1a9d39176317883026a
Reviewed-on: https://chromium-review.googlesource.com/c/1496239
Commit-Queue: Kevin Strohbehn <ginko@google.com>
Commit-Queue: Xiyuan Xia <xiyuan@chromium.org>
Auto-Submit: Kevin Strohbehn <ginko@google.com>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636623}
parent 08a7eb22
......@@ -204,6 +204,10 @@ void SearchResultPageView::AddSearchResultContainerView(
}
bool SearchResultPageView::IsFirstResultTile() const {
// In the event that the result does not exist, it is not a tile.
if (!first_result_view_ || !first_result_view_->result())
return false;
// |kRecommendation| result type refers to tiles in Zero State.
return first_result_view_->result()->display_type() ==
ash::SearchResultDisplayType::kTile ||
......
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