Fix bug #2878 'bsfilter / folder.c:1435 Condition identifier != NULL failed'
authorRicardo Mones <ricardo@mones.org>
Thu, 18 Apr 2013 22:17:16 +0000 (00:17 +0200)
committerRicardo Mones <ricardo@mones.org>
Thu, 18 Apr 2013 22:17:16 +0000 (00:17 +0200)
Don't call folder_find_item_from_identifier if using default
NULL value

src/plugins/bsfilter/bsfilter.c

index e86cc99..8484b2c 100644 (file)
@@ -587,7 +587,11 @@ gint plugin_init(gchar **error)
 
 FolderItem *bsfilter_get_spam_folder(MsgInfo *msginfo)
 {
-       FolderItem *item = folder_find_item_from_identifier(config.save_folder);
+       FolderItem *item = NULL;
+       
+       if (config.save_folder != NULL) {
+               item = folder_find_item_from_identifier(config.save_folder);
+       }
 
        if (item || msginfo == NULL || msginfo->folder == NULL)
                return item;