summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 04:22:19 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 04:22:19 +0000
commitc52112ecd0eb30b1ab8b4269b8bd2a93b40f3acf (patch)
tree136fe6db106325d3906ae08af8855896690af99f /chrome
parent8d00f051b7c90a939b3c06b4b30489ea139fe54a (diff)
downloadchromium_src-c52112ecd0eb30b1ab8b4269b8bd2a93b40f3acf.zip
chromium_src-c52112ecd0eb30b1ab8b4269b8bd2a93b40f3acf.tar.gz
chromium_src-c52112ecd0eb30b1ab8b4269b8bd2a93b40f3acf.tar.bz2
A crasher from the field seems to indicate that the page render widget host view win can get the focus after the TabContents delegate has been NULLed.
BUG=http://crbug.com/14599 TEST=Exercise closing tabs with on-unload handlers. Review URL: http://codereview.chromium.org/132052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18788 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rwxr-xr-xchrome/browser/views/tab_contents/tab_contents_view_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/views/tab_contents/tab_contents_view_win.cc b/chrome/browser/views/tab_contents/tab_contents_view_win.cc
index edc48c8..1b7fa80 100755
--- a/chrome/browser/views/tab_contents/tab_contents_view_win.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_view_win.cc
@@ -326,7 +326,8 @@ void TabContentsViewWin::UpdateDragCursor(bool is_drop_target) {
}
void TabContentsViewWin::GotFocus() {
- tab_contents()->delegate()->TabContentsFocused(tab_contents());
+ if (tab_contents()->delegate())
+ tab_contents()->delegate()->TabContentsFocused(tab_contents());
}
void TabContentsViewWin::TakeFocus(bool reverse) {