[Xfce4-commits] <thunar:master> Fix crash when removing an ancestor of the current folder (bug #8168).
Jannis Pohlmann
noreply at xfce.org
Sun Feb 26 18:46:01 CET 2012
Updating branch refs/heads/master
to d47f4053b1ea47299f5ef501cd98e5d5c7cf2026 (commit)
from 16c99c3c0550d440a8e83cf3fb0775bb04065ab6 (commit)
commit d47f4053b1ea47299f5ef501cd98e5d5c7cf2026
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Sun Feb 26 17:38:50 2012 +0000
Fix crash when removing an ancestor of the current folder (bug #8168).
Whenever we release the GFileMonitor of a ThunarFolder, we also need to
disconnect from its signals. Otherwise one of the signal handlers might
still be called, potentially with corrupted user data (which was the
case here).
NEWS | 1 +
thunar/thunar-folder.c | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index c02e6a5..f840b87 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@
- Fix sorting of filenames with large numbers (bug #5356).
Patch by Eric Koegel.
- Respect ThunarIconFactory::show-thumbnails. Fixes a regression.
+- Fix crash when removing an ancestor of the current folder (bug #8168).
1.3.0
=====
diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c
index 73eb774..9ea6939 100644
--- a/thunar/thunar-folder.c
+++ b/thunar/thunar-folder.c
@@ -238,6 +238,7 @@ thunar_folder_finalize (GObject *object)
/* disconnect from the file alteration monitor */
if (G_LIKELY (folder->monitor != NULL))
{
+ g_signal_handlers_disconnect_matched (folder->monitor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
g_file_monitor_cancel (folder->monitor);
g_object_unref (folder->monitor);
}
@@ -769,6 +770,7 @@ thunar_folder_reload (ThunarFolder *folder)
/* disconnect from the file alteration monitor */
if (G_UNLIKELY (folder->monitor != NULL))
{
+ g_signal_handlers_disconnect_matched (folder->monitor, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
g_file_monitor_cancel (folder->monitor);
g_object_unref (folder->monitor);
folder->monitor = NULL;
More information about the Xfce4-commits
mailing list