properties-window: fix use-after-free on destroy

stop_deep_count_for_file() removes from deep_count_files list

https://bugzilla.gnome.org/show_bug.cgi?id=691004
This commit is contained in:
Pavel Vasin 2013-01-01 17:22:43 +04:00 committed by Cosimo Cecchi
parent 3d27860778
commit bbc2d59f16

View file

@ -5236,11 +5236,9 @@ real_destroy (GtkWidget *object)
g_source_remove (window->details->deep_count_spinner_timeout_id);
}
for (l = window->details->deep_count_files; l != NULL; l = l->next) {
stop_deep_count_for_file (window, l->data);
while (window->details->deep_count_files) {
stop_deep_count_for_file (window, window->details->deep_count_files->data);
}
g_list_free (window->details->deep_count_files);
window->details->deep_count_files = NULL;
window->details->name_field = NULL;