listbox: Don't emit selected-rows-changed, etc. during destruction

https://bugzilla.gnome.org/show_bug.cgi?id=776012
This commit is contained in:
Debarshi Ray 2016-12-18 09:43:38 +01:00
parent 9791641d43
commit f5818c594c

View File

@ -2549,7 +2549,7 @@ gtk_list_box_remove (GtkContainer *container,
if (was_visible && gtk_widget_get_visible (GTK_WIDGET (box)))
gtk_widget_queue_resize (widget);
if (was_selected)
if (was_selected && !gtk_widget_in_destruction (widget))
{
g_signal_emit (box, signals[ROW_SELECTED], 0, NULL);
g_signal_emit (box, signals[SELECTED_ROWS_CHANGED], 0);