summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/info_bubble_gtk.h
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 15:04:18 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 15:04:18 +0000
commit94cc41988303b41d2bfff0042a07697225e7b4d9 (patch)
tree18761dca1afe91e1f564a6ad35a1dbed2b5101e0 /chrome/browser/gtk/info_bubble_gtk.h
parentc5b0b4a3feab5433134bbb0d394caa7421e77506 (diff)
downloadchromium_src-94cc41988303b41d2bfff0042a07697225e7b4d9.zip
chromium_src-94cc41988303b41d2bfff0042a07697225e7b4d9.tar.gz
chromium_src-94cc41988303b41d2bfff0042a07697225e7b4d9.tar.bz2
NULL-check before accessing toplevel_window_ to avoid race-condition crash.
To reliably reproduce (before this patch), run browser_tests --gtest_filter=ExtensionApiTest.ShowPageActionPopup and then move the mouse pointer outside of the browser window. BUG=none TEST=fixes ExtensionApiTest.ShowPageActionPopup Review URL: http://codereview.chromium.org/1555006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/info_bubble_gtk.h')
-rw-r--r--chrome/browser/gtk/info_bubble_gtk.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/gtk/info_bubble_gtk.h b/chrome/browser/gtk/info_bubble_gtk.h
index 10274fa..e5601fd 100644
--- a/chrome/browser/gtk/info_bubble_gtk.h
+++ b/chrome/browser/gtk/info_bubble_gtk.h
@@ -172,6 +172,9 @@ class InfoBubbleGtk : public NotificationObserver {
GtkAccelGroup* accel_group_;
// The window for which we're being shown (and to which |rect_| is relative).
+ // Note that it's possible for |toplevel_window_| to be NULL if the
+ // window is destroyed before this object is destroyed, so it's important
+ // to check for that case.
GtkWindow* toplevel_window_;
// Provides an offset from |toplevel_window_|'s origin for MoveWindow() to