Commit f5804d54 authored by Daniel Zhang's avatar Daniel Zhang Committed by Commit Bot

cros: Fix crash caused by calling AppListView layout()

Fix a bug in which AppListView crashes when layout()
is called. This is because
|app_list_background_shield_mask_| may not be
initialized when layout() is called.

Bug: 882553
Change-Id: I582be13c4998c262de89cc9c46543bbdcb9c9801
Reviewed-on: https://chromium-review.googlesource.com/1220033Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Daniel Zhang <oxyflush@google.com>
Cr-Commit-Position: refs/heads/master@{#590506}
parent 3384067b
......@@ -1157,7 +1157,8 @@ void AppListView::Layout() {
-kAppListBackgroundRadius * 2);
app_list_background_shield_->SetBoundsRect(app_list_background_shield_bounds);
app_list_background_shield_->UpdateCornerRadius(kAppListBackgroundRadius);
if (is_background_blur_enabled_ && !IsHomeLauncherEnabledInTabletMode() &&
if (is_background_blur_enabled_ && app_list_background_shield_mask_ &&
!IsHomeLauncherEnabledInTabletMode() &&
app_list_background_shield_->layer()->size() !=
app_list_background_shield_mask_->layer()->size()) {
// Update the blur mask for the |app_list_background_shield_| with same
......
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