summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-01 17:09:33 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-01 17:09:33 +0000
commitfb55af635ec14a574e92f871ef7773271151fd97 (patch)
tree1f8ca500a560b89276263a6929347c0b1dc2c6d7 /ash
parent07eab67dbc0ff30bec17877b275257c820e31e20 (diff)
downloadchromium_src-fb55af635ec14a574e92f871ef7773271151fd97.zip
chromium_src-fb55af635ec14a574e92f871ef7773271151fd97.tar.gz
chromium_src-fb55af635ec14a574e92f871ef7773271151fd97.tar.bz2
Merge 159355 - Test for anchor in TrayBubbleView before accessing
If BubbleDelegateView::OnWidgetClosing() gets called before TrayLayerAnimationObserver::OnLayerAnimationEnded gets called, it would be possible for anchor_rect() to get set to NULL and cause this crash. Adding a NULL check should be sufficient. BUG=152999 TEST=Crash no longer occurs (See issue) Review URL: https://chromiumcodereview.appspot.com/10989085 TBR=stevenjb@chromium.org Review URL: https://codereview.chromium.org/11033004 git-svn-id: svn://svn.chromium.org/chrome/branches/1271/src@159514 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/system/tray/tray_bubble_view.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ash/system/tray/tray_bubble_view.cc b/ash/system/tray/tray_bubble_view.cc
index dfdd5cf..b85794f 100644
--- a/ash/system/tray/tray_bubble_view.cc
+++ b/ash/system/tray/tray_bubble_view.cc
@@ -378,7 +378,7 @@ void TrayBubbleView::Init() {
gfx::Rect TrayBubbleView::GetAnchorRect() {
gfx::Rect rect;
- if (anchor_widget()->IsVisible()) {
+ if (anchor_widget() && anchor_widget()->IsVisible()) {
rect = anchor_widget()->GetWindowBoundsInScreen();
if (params_.anchor_type == ANCHOR_TYPE_TRAY) {
if (params_.shelf_alignment == SHELF_ALIGNMENT_BOTTOM) {