From ac39730dcd4b48116f39427c1037349dfd8b2e4d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Mon, 17 Dec 2007 15:28:42 +0000 Subject: [PATCH] Check for the existence of GErrors in modest_mail_operation_save_to_drafts_cb() pmo-trunk-r3932 --- src/modest-mail-operation.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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"); -- 1.7.9.5