| Index: views/controls/native_control_gtk.cc
|
| diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc
|
| index 49453efe71380f7bf0ce9f20732a05462682e50f..66e6994358b806e7c6561e4194f32fa58ef32d2a 100644
|
| --- a/views/controls/native_control_gtk.cc
|
| +++ b/views/controls/native_control_gtk.cc
|
| @@ -49,9 +49,9 @@ void NativeControlGtk::VisibilityChanged(View* starting_from, bool is_visible) {
|
| if (native_view()) {
|
| // We destroy the child widget when we become invisible because of the
|
| // performance cost of maintaining widgets that aren't currently needed.
|
| - GtkWidget* widget = native_view();
|
| Detach();
|
| - gtk_widget_destroy(widget);
|
| + // Make sure that Detach destroyed the widget.
|
| + DCHECK(!native_view());
|
| }
|
| } else if (!native_view()) {
|
| if (GetWidget())
|
|
|