From 3f7c1446053679271bdffc1fe6f5af26e4890f61 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 31 Aug 2009 15:53:45 -0500 Subject: [PATCH] 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 --- gtk/gtkfilesystemmodel.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c index 07f3685bf0..00a531b61d 100644 --- a/gtk/gtkfilesystemmodel.c +++ b/gtk/gtkfilesystemmodel.c @@ -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);