Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4814)

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 2406933002: Fix crash in ShowBookmarkBubble. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index d76088c3793a12325973360ed14eb9b10c67d4b3..249adb3ebfca349332c9b6eac7e22d5132ec3168 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -305,7 +305,7 @@ void ToolbarView::ShowBookmarkBubble(
views::Widget* bubble_widget = BookmarkBubbleView::ShowBubble(
anchor_view, gfx::Rect(), nullptr, observer, std::move(delegate),
browser_->profile(), url, already_bookmarked);
- if (star_view)
+ if (bubble_widget && star_view)
bubble_widget->AddObserver(star_view);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698