diff --git a/thunar/thunar-toolbar-editor.c b/thunar/thunar-toolbar-editor.c index d1bb139f5e61b043c00ae399b6f31f31aa781757..30ef10ca38bcc10837cf8999cc55aca5959d26a6 100644 --- a/thunar/thunar-toolbar-editor.c +++ b/thunar/thunar-toolbar-editor.c @@ -567,6 +567,7 @@ thunar_toolbar_editor_populate_model (ThunarToolbarEditor *toolbar_editor) order = g_object_get_data (G_OBJECT (item), "default-order"); widget = gtk_label_new_with_mnemonic (label_with_mnemonic); + g_object_ref_sink (widget); gtk_list_store_append (toolbar_editor->model, &iter); gtk_list_store_set (toolbar_editor->model, &iter, @@ -576,7 +577,7 @@ thunar_toolbar_editor_populate_model (ThunarToolbarEditor *toolbar_editor) 3, *order, -1); - gtk_widget_destroy (widget); + g_object_unref (widget); } /* connect after model has been fully initialized */