new filtering
[claws.git] / src / mh.c
index 77e23251054e7d5c730589235fd9d0b753f50d3e..bed1489d16b89791bfd72ea8d14430dd67f43913 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -166,6 +166,11 @@ gint mh_move_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo)
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(msginfo != NULL, -1);
 
+       if (!msginfo->folder) {
+               g_warning(_("the folder of the message is not defined\n"));
+               return -1;
+       }
+
        if (msginfo->folder == dest) {
                g_warning(_("the src folder is identical to the dest.\n"));
                return -1;
@@ -331,6 +336,11 @@ gint mh_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo)
        g_return_val_if_fail(dest != NULL, -1);
        g_return_val_if_fail(msginfo != NULL, -1);
 
+       if (!msginfo->folder) {
+               g_warning(_("the folder of the message is not defined\n"));
+               return -1;
+       }
+
        if (msginfo->folder == dest) {
                g_warning(_("the src folder is identical to the dest.\n"));
                return -1;
@@ -887,7 +897,7 @@ static MsgInfo *mh_parse_msg(const gchar *file, FolderItem *item)
 
 static gboolean mh_is_maildir_one(const gchar *path, const gchar *dir)
 {
-       char *entry;
+       gchar *entry;
        gboolean result;
 
        entry = g_strconcat(path, G_DIR_SEPARATOR_S, dir, NULL);