Commit 3bbb2939 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Fix null dereference in QuitInstructionBubble

BUG=908677
R=sky

Change-Id: I5d4a5a43fdf6d503cbd69619472e130a7abcc374
Reviewed-on: https://chromium-review.googlesource.com/c/1351690Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611443}
parent b5418f5c
...@@ -60,9 +60,11 @@ void QuitInstructionBubble::AnimationProgressed( ...@@ -60,9 +60,11 @@ void QuitInstructionBubble::AnimationProgressed(
// Set the bounds to that of the active browser window so that the widget // Set the bounds to that of the active browser window so that the widget
// will be centered on the nearest monitor. // will be centered on the nearest monitor.
params.bounds = BrowserView::GetBrowserViewForBrowser( const Browser* last_active = BrowserList::GetInstance()->GetLastActive();
BrowserList::GetInstance()->GetLastActive()) if (last_active) {
->GetBounds(); params.bounds =
BrowserView::GetBrowserViewForBrowser(last_active)->GetBounds();
}
params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
params.accept_events = false; params.accept_events = false;
......
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