Commit e48b681f authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

overview: Fix crash in OverviewItemView::GetPreviewViewSize.

The stack points right at that line so it was pretty straightforward.
I tried reproing locally and writing a regression test but it was a
strange timing I couldn't get to work. The best I discovered was a
semi-repro steps which showed |overview_item_| was indeed a nullptr.

Test: manual
Bug: 1069533
Change-Id: Ia525a029e5afbdf863880cd888135c9f105d503c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144677Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758091}
parent c8d70ddb
......@@ -307,7 +307,8 @@ gfx::Size OverviewItemView::GetPreviewViewSize() const {
preview_pref_size.width() / preview_pref_size.height();
gfx::SizeF target_size(GetContentAreaBounds().size());
OverviewGridWindowFillMode fill_mode =
overview_item_->GetWindowDimensionsType();
overview_item_ ? overview_item_->GetWindowDimensionsType()
: OverviewGridWindowFillMode::kNormal;
switch (fill_mode) {
case OverviewGridWindowFillMode::kNormal:
break;
......
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