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

Unified Diff: chrome/browser/ui/gtk/tab_contents_container_gtk.cc

Issue 9109028: GTK: Another GTK deprecation patch. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: evanm fix Created 8 years, 12 months 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 | « chrome/browser/ui/gtk/rounded_window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tab_contents_container_gtk.cc
diff --git a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
index 48e45a947656605852976a6f25319d0070474349..20aa8d5c9d01cafd499f6b18a33ceaf878b033a4 100644
--- a/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
+++ b/chrome/browser/ui/gtk/tab_contents_container_gtk.cc
@@ -165,9 +165,12 @@ void TabContentsContainerGtk::DetachTab(TabContentsWrapper* tab) {
// It is possible to detach an unrealized, unparented TabContents if you
// slow things down enough in valgrind. Might happen in the real world, too.
- if (widget && widget->parent) {
- DCHECK_EQ(widget->parent, expanded_);
- gtk_container_remove(GTK_CONTAINER(expanded_), widget);
+ if (widget) {
+ GtkWidget* parent = gtk_widget_get_parent(widget);
+ if (parent) {
+ DCHECK_EQ(parent, expanded_);
+ gtk_container_remove(GTK_CONTAINER(expanded_), widget);
+ }
}
}
« no previous file with comments | « chrome/browser/ui/gtk/rounded_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698