Fixes bug 494490 (bnc) - Fixes a crash while moving messages twice.
authorChenthill Palanisamy <pchenthill@novell.com>
Tue, 19 May 2009 12:36:01 +0000 (18:06 +0530)
committerChenthill Palanisamy <pchenthill@novell.com>
Tue, 19 May 2009 13:32:18 +0000 (19:02 +0530)
camel/providers/groupwise/camel-groupwise-folder.c

index 69f9302..bf6bf7f 100644 (file)
@@ -2374,6 +2374,12 @@ groupwise_transfer_messages_to (CamelFolder *source, GPtrArray *uids,
                count = camel_folder_summary_count (destination->summary);
 
                info = camel_folder_summary_uid (source->summary, uids->pdata[index]);
+               if (!info) {
+                       g_warning ("Could not find the message: its either deleted or moved already");
+                       index++;
+                       continue;
+               }
+
                gw_info = (CamelGroupwiseMessageInfo *) info;
                if (gw_info && (gw_info->info.flags & CAMEL_MESSAGE_FOLDER_FLAGGED)) {
                        do_flags_diff (&diff, gw_info->server_flags, gw_info->info.flags);