[Commits] notification_foldercheck.c 1.1.2.16 1.1.2.17
holger at claws-mail.org
holger at claws-mail.org
Sun Dec 9 18:15:28 CET 2012
Update of /home/claws-mail/plugins/notification/src
In directory srv:/tmp/cvs-serv19166/src
Modified Files:
Tag: gtk2
notification_foldercheck.c
Log Message:
2012-12-09 [holger] 0.31cvs3
* src/notification_foldercheck.c
Restrict feature to only notify about selected
folders to built-in folders.
Folders provided by other plugins may vanish
due to the other plugin being unloaded, resulting
in dangling pointers and crashes.
Fixes bug #2141
Index: notification_foldercheck.c
===================================================================
RCS file: /home/claws-mail/plugins/notification/src/Attic/notification_foldercheck.c,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -u -d -r1.1.2.16 -r1.1.2.17
--- notification_foldercheck.c 7 Jul 2012 15:30:50 -0000 1.1.2.16
+++ notification_foldercheck.c 9 Dec 2012 17:15:25 -0000 1.1.2.17
@@ -710,9 +710,24 @@
for(list = folder_get_list(); list != NULL; list = list->next) {
folder = FOLDER(list->data);
- g_return_if_fail(folder != NULL);
- foldercheck_insert_gnode_in_store(entry->tree_store, folder->node, NULL);
+ if(folder == NULL) {
+ debug_print("Notification plugin::foldercheck_set_tree(): Found a NULL folder.\n");
+ continue;
+ }
+
+ /* Only regard built-in folders, because folders from plugins (such as RSS, calendar,
+ * or plugin-provided mailbox storage systems like Maildir or MBox) may vanish
+ * without letting us know. */
+ switch(folder->klass->type) {
+ case F_MH:
+ case F_IMAP:
+ case F_NEWS:
+ foldercheck_insert_gnode_in_store(entry->tree_store, folder->node, NULL);
+ break;
+ default:
+ break;
+ }
}
gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(entry->tree_store),
More information about the Commits
mailing list