Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Unified Diff: chrome/browser/tab_contents/tab_contents_view_gtk.cc

Issue 8578010: Print Preview: Fixing crash when hitting tab multiple times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view_gtk.cc
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index 4f63b299c3b21b72f6c9690cb26ece0d8ae77a57..4ca60b5127713259a3bfe114a912af8c816e8c5f 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -272,6 +272,8 @@ void TabContentsViewGtk::GotFocus() {
// This is called when we the renderer asks us to take focus back (i.e., it has
Lei Zhang 2011/11/16 21:52:06 s/when we/when /
// 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698