places view: fix a crash in finalize
Fix a GtkPlacesView crash in the test suite, _again_.
This commit is contained in:
parent
47167f59be
commit
c1ad0f595c
@ -960,7 +960,6 @@ network_enumeration_next_files_finished (GObject *source_object,
|
|||||||
priv = gtk_places_view_get_instance_private (view);
|
priv = gtk_places_view_get_instance_private (view);
|
||||||
error = NULL;
|
error = NULL;
|
||||||
|
|
||||||
gtk_places_view_set_fetching_networks (view, FALSE);
|
|
||||||
detected_networks = g_file_enumerator_next_files_finish (G_FILE_ENUMERATOR (source_object),
|
detected_networks = g_file_enumerator_next_files_finish (G_FILE_ENUMERATOR (source_object),
|
||||||
res, &error);
|
res, &error);
|
||||||
|
|
||||||
@ -973,6 +972,7 @@ network_enumeration_next_files_finished (GObject *source_object,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
gtk_places_view_set_fetching_networks (view, FALSE);
|
||||||
populate_networks (view, G_FILE_ENUMERATOR (source_object), detected_networks);
|
populate_networks (view, G_FILE_ENUMERATOR (source_object), detected_networks);
|
||||||
|
|
||||||
g_list_free_full (detected_networks, g_object_unref);
|
g_list_free_full (detected_networks, g_object_unref);
|
||||||
@ -980,9 +980,10 @@ network_enumeration_next_files_finished (GObject *source_object,
|
|||||||
|
|
||||||
/* avoid to update widgets if the operation was cancelled in finalize */
|
/* avoid to update widgets if the operation was cancelled in finalize */
|
||||||
if (priv->listbox != NULL)
|
if (priv->listbox != NULL)
|
||||||
|
{
|
||||||
update_network_state (view);
|
update_network_state (view);
|
||||||
|
|
||||||
update_loading (view);
|
update_loading (view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user