diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 00:16:53 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 00:16:53 +0000 |
commit | c7eca5b2c6f9a527d18d00486d2d7cd7dca9c7b1 (patch) | |
tree | 87345b672fcaeebe4ff42b85aa089fa14d37652d /chrome/browser | |
parent | 3a91eff218570a1d5c322262c96fbb0a41e3b580 (diff) | |
download | chromium_src-c7eca5b2c6f9a527d18d00486d2d7cd7dca9c7b1.zip chromium_src-c7eca5b2c6f9a527d18d00486d2d7cd7dca9c7b1.tar.gz chromium_src-c7eca5b2c6f9a527d18d00486d2d7cd7dca9c7b1.tar.bz2 |
Fix a crash when a moust observer got a mouse event on a wnidow that has already been destroyed.
BUG=chromium-os:1697
TEST=manual: switch to compact nav bar mode (ctrl-shift-c), move mouse to a tab to open compact location bar,
then open app launcher. Type in something in the address bar and select from suggestion list.
Review URL: http://codereview.chromium.org/1048003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chromeos/compact_location_bar_host.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/chromeos/compact_location_bar_host.cc b/chrome/browser/chromeos/compact_location_bar_host.cc index 3121167e..328549d 100644 --- a/chrome/browser/chromeos/compact_location_bar_host.cc +++ b/chrome/browser/chromeos/compact_location_bar_host.cc @@ -48,8 +48,9 @@ class MouseObserver : public MessageLoopForUI::Observer { virtual void DidProcessEvent(GdkEvent* event) { // Hide the location bar iff the mouse is pressed on the // BrowserView's content area. - if (top_level_window_ == gdk_window_get_toplevel(event->any.window) && - event->type == GDK_BUTTON_PRESS && + if (event->type == GDK_BUTTON_PRESS && + GDK_IS_WINDOW(event->any.window) && + top_level_window_ == gdk_window_get_toplevel(event->any.window) && HitContentArea(event)) { host_->Hide(true); } |