summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 22:40:25 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-19 22:40:25 +0000
commitac20559299eb260dc32f8e85839d4ba77585dac6 (patch)
tree71aec7899a96bb28c5786bb614f15c2081a3c811 /chrome
parentc915fbdeaef22ead8fd8b940294d519f801e7259 (diff)
downloadchromium_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
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc4
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