diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 00:44:09 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-17 00:44:09 +0000 |
commit | 808fe69c0cffd49b0b273ca22ae9d93251fa0a53 (patch) | |
tree | b2245dc4f8c9843fc2d363f2ce6c2d82d301aa6a | |
parent | 0b05881d34f769401afa44b9438bdd9588a7921f (diff) | |
download | chromium_src-808fe69c0cffd49b0b273ca22ae9d93251fa0a53.zip chromium_src-808fe69c0cffd49b0b273ca22ae9d93251fa0a53.tar.gz chromium_src-808fe69c0cffd49b0b273ca22ae9d93251fa0a53.tar.bz2 |
Print Preview: Fixing crash when hitting tab multiple times.
BUG=104478
TEST=Hit tab mulitple times, browser should not crash, focus should cycle through printing options.
Review URL: http://codereview.chromium.org/8578010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110396 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_gtk.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc index 4f63b29..d4a1321 100644 --- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc +++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc @@ -269,9 +269,11 @@ void TabContentsViewGtk::GotFocus() { // all subclasses. http://crbug.com/21875 } -// This is called when we the renderer asks us to take focus back (i.e., it has +// This is called when the renderer asks us to take focus back (i.e., it has // iterated past the last focusable element on the page). void TabContentsViewGtk::TakeFocus(bool reverse) { + if (!tab_contents_->delegate()) + return; if (!tab_contents_->delegate()->TakeFocus(reverse)) { gtk_widget_child_focus(GTK_WIDGET(GetTopLevelNativeWindow()), reverse ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD); |