diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 22:40:25 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-19 22:40:25 +0000 |
commit | ac20559299eb260dc32f8e85839d4ba77585dac6 (patch) | |
tree | 71aec7899a96bb28c5786bb614f15c2081a3c811 | |
parent | c915fbdeaef22ead8fd8b940294d519f801e7259 (diff) | |
download | chromium_src-ac20559299eb260dc32f8e85839d4ba77585dac6.zip chromium_src-ac20559299eb260dc32f8e85839d4ba77585dac6.tar.gz chromium_src-ac20559299eb260dc32f8e85839d4ba77585dac6.tar.bz2 |
gtk: Make sure we found the window corresponding to the XID of the window under the drag.
BUG=19552
TEST=Drag a tab up and out of the tab strip. This should not crash.
Review URL: http://codereview.chromium.org/174091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23768 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/gtk/browser_window_gtk.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index bddb566..b1fe07f 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -1265,7 +1265,9 @@ BrowserWindowGtk* BrowserWindowGtk::GetBrowserWindowForNativeWindow( // static GtkWindow* BrowserWindowGtk::GetBrowserWindowForXID(XID xid) { - return BrowserWindowGtk::xid_map_.find(xid)->second; + std::map<XID, GtkWindow*>::iterator iter = + BrowserWindowGtk::xid_map_.find(xid); + return (iter != BrowserWindowGtk::xid_map_.end()) ? iter->second : NULL; } // static |