[evolution/gnome-3-34] Fix a crash when changing Archive folder



commit 9c302d05a1427910d11868447fe92bf0b12a0bc0
Author: Milan Crha <mcrha redhat com>
Date:   Fri Oct 18 07:40:46 2019 +0200

    Fix a crash when changing Archive folder
    
    This happened when for example a new folder had been created and after
    it the archive folder had been changed in Preferences. The reason was
    that there was left a signal handler for an EMFolderTreeModel, which had
    been already freed. Disconnecting the signal handler in the dispose
    of the EMFolderTreeModel fixes the crash.

 src/mail/em-folder-tree-model.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/mail/em-folder-tree-model.c b/src/mail/em-folder-tree-model.c
index ffdc4df952..b4b37adb82 100644
--- a/src/mail/em-folder-tree-model.c
+++ b/src/mail/em-folder-tree-model.c
@@ -940,9 +940,9 @@ folder_tree_model_dispose (GObject *object)
                MailFolderCache *folder_cache;
 
                folder_cache = e_mail_session_get_folder_cache (priv->session);
-               g_signal_handlers_disconnect_matched (
-                       folder_cache, G_SIGNAL_MATCH_DATA,
-                       0, 0, NULL, NULL, object);
+               g_signal_handlers_disconnect_by_data (folder_cache, object);
+
+               g_signal_handlers_disconnect_by_data (priv->session, object);
 
                g_object_unref (priv->session);
                priv->session = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]