From: Alberto Garcia Date: Mon, 17 Dec 2007 15:28:42 +0000 (+0000) Subject: Check for the existence of GErrors in modest_mail_operation_save_to_drafts_cb() X-Git-Tag: git_migration_finished~1907 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=ac39730dcd4b48116f39427c1037349dfd8b2e4d Check for the existence of GErrors in modest_mail_operation_save_to_drafts_cb() pmo-trunk-r3932 --- diff --git a/src/modest-mail-operation.c b/src/modest-mail-operation.c index ae6f9ae..961d5d4 100644 --- a/src/modest-mail-operation.c +++ b/src/modest-mail-operation.c @@ -1051,13 +1051,15 @@ modest_mail_operation_save_to_drafts_cb (ModestMailOperation *self, priv = MODEST_MAIL_OPERATION_GET_PRIVATE(self); if (!msg) { - g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR, - MODEST_MAIL_OPERATION_ERROR_INSTANCE_CREATION_FAILED, - "modest: failed to create a new msg\n"); + if (!(priv->error)) { + g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR, + MODEST_MAIL_OPERATION_ERROR_INSTANCE_CREATION_FAILED, + "modest: failed to create a new msg\n"); + } } else { drafts = modest_tny_account_get_special_folder (TNY_ACCOUNT (info->transport_account), TNY_FOLDER_TYPE_DRAFTS); - if (!drafts) { + if (!drafts && !(priv->error)) { g_set_error (&(priv->error), MODEST_MAIL_OPERATION_ERROR, MODEST_MAIL_OPERATION_ERROR_ITEM_NOT_FOUND, "modest: failed to create a new msg\n");