Index: ui/views/bubble/bubble_delegate.cc |
diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc |
index ecee2a0589ff05bec9a7e6f47694084de3d61b74..21ccd1e38c8879d9d344aa97ebdeff4e294f8065 100644 |
--- a/ui/views/bubble/bubble_delegate.cc |
+++ b/ui/views/bubble/bubble_delegate.cc |
@@ -231,9 +231,8 @@ void BubbleDelegateView::OnWidgetBoundsChanged(Widget* widget, |
} |
gfx::Rect BubbleDelegateView::GetAnchorRect() { |
- if (!anchor_view()) |
- return gfx::Rect(anchor_point_, gfx::Size()); |
- gfx::Rect anchor_bounds = anchor_view()->GetBoundsInScreen(); |
+ gfx::Rect anchor_bounds = anchor_view() ? anchor_view()->GetBoundsInScreen() : |
+ gfx::Rect(anchor_point_, gfx::Size()); |
anchor_bounds.Inset(anchor_insets_); |
return anchor_bounds; |
} |