| 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);
|
| + }
|
| }
|
| }
|
|
|
|
|