g_error_free(priv->error);
}
- priv->error = g_error_copy(err);
+ priv->error = (err == NULL) ? NULL : g_error_copy(err);
if ((!priv->error) && (info->draft_msg != NULL)) {
TnyHeader *header = tny_msg_get_header (info->draft_msg);
{
ModestMailOperation *mail_op = MODEST_MAIL_OPERATION (data);
- /* Do not need to block, the notify end will do it for us */
+ gdk_threads_enter ();
modest_mail_operation_notify_end (mail_op);
+ gdk_threads_leave ();
g_object_unref (mail_op);
return FALSE;