summaryrefslogtreecommitdiff
path: root/gtk/gtkfilesystemmodel.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2009-08-31 15:53:45 -0500
committerBenjamin Otte <otte@gnome.org>2009-10-15 22:06:15 +0200
commit3f7c1446053679271bdffc1fe6f5af26e4890f61 (patch)
tree967a7067efb4bc28da123d9367292522554e89df /gtk/gtkfilesystemmodel.c
parent30016185be806b4ee2100e4b6973668606bddad8 (diff)
downloadgtk+-3f7c1446053679271bdffc1fe6f5af26e4890f61.tar.gz
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>
Diffstat (limited to 'gtk/gtkfilesystemmodel.c')
-rw-r--r--gtk/gtkfilesystemmodel.c6
1 files changed, 6 insertions, 0 deletions
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);