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

Unified Diff: ui/views/bubble/bubble_delegate.cc

Issue 8909013: Patch AvatarMenuBubbleView crash; only SizeToContents if GetBubbleFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Run OnAvatarMenuModelChanged on Init, not ctor. Created 9 years 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
Index: ui/views/bubble/bubble_delegate.cc
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc
index 9a790d971511be39842c85651964314fcb4fe3e5..663cec9951fbfa1580224f083b4ce93b875e6972 100644
--- a/ui/views/bubble/bubble_delegate.cc
+++ b/ui/views/bubble/bubble_delegate.cc
@@ -279,7 +279,8 @@ void BubbleDelegateView::SizeToContents() {
BubbleFrameView* BubbleDelegateView::GetBubbleFrameView() const {
const Widget* widget = border_widget_ ? border_widget_ : GetWidget();
- return static_cast<BubbleFrameView*>(widget->non_client_view()->frame_view());
+ const NonClientView* view = widget ? widget->non_client_view() : NULL;
+ return view ? static_cast<BubbleFrameView*>(view->frame_view()) : NULL;
}
gfx::Rect BubbleDelegateView::GetBubbleBounds() {
« chrome/browser/ui/views/avatar_menu_bubble_view.cc ('K') | « ui/views/bubble/bubble_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698