Remove the dir_thaw_source while disposing the model

Otherwise that timeout may trigger after the model has died.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
Federico Mena Quintero 2009-08-31 15:53:45 -05:00 committed by Benjamin Otte
parent 30016185be
commit 3f7c144605

View File

@ -830,6 +830,12 @@ gtk_file_system_model_dispose (GObject *object)
{
GtkFileSystemModel *model = GTK_FILE_SYSTEM_MODEL (object);
if (model->dir_thaw_source)
{
g_source_remove (model->dir_thaw_source);
model->dir_thaw_source = 0;
}
g_cancellable_cancel (model->cancellable);
if (model->dir_monitor)
g_file_monitor_cancel (model->dir_monitor);