Commit 17257534 authored by pkasting's avatar pkasting Committed by Commit bot

Speculative fix for crash during browser startup with opaque frame.

Unconditionally requesting the browser's toolbar view causes a null deref.  Try
to guard by checking if the toolbar is visible first.  This should fix the crash
unless at this point the toolbar feature is turned on but the toolbar view
itself has not been created.  Hopefully that's not the case.

BUG=581673
TEST=none
TBR=sky

Review URL: https://codereview.chromium.org/1649493003

Cr-Commit-Position: refs/heads/master@{#371970}
parent 42079f3f
......@@ -387,7 +387,7 @@ void OpaqueBrowserFrameViewLayout::LayoutIncognitoIcon(views::View* host) {
int min_button_width = NonClientBorderThickness();
// In non-MD, the toolbar has a rounded corner that we don't want the tabstrip
// to overlap.
if (!md && !avatar_button_)
if (!md && !avatar_button_ && delegate_->IsToolbarVisible())
min_button_width += delegate_->GetToolbarLeadingCornerClientWidth();
leading_button_start_ = std::max(leading_button_start_, min_button_width);
// The trailing corner is a mirror of the leading one.
......
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