Fix for e9f610a4f for the rare cases the privacy system has no error string ready.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 13 Apr 2018 18:25:37 +0000 (20:25 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 13 Apr 2018 18:25:37 +0000 (20:25 +0200)
src/compose.c

index 4cfa88b0c39d9562390b049cecf50dbb02df9faa..97d53bdae7ae0f7a3fcde7898223f678098678f6 100644 (file)
@@ -5218,11 +5218,13 @@ static void _display_queue_error(ComposeQueueResult val)
                        break;
                case COMPOSE_QUEUE_ERROR_SIGNING_FAILED:
                        alertpanel_error(_("Could not queue message for sending:\n\n"
-                                               "Signature failed: %s"), privacy_get_error());
+                                               "Signature failed: %s"),
+                                       privacy_peek_error() ? privacy_get_error() : _("Unknown error"));
                        break;
                case COMPOSE_QUEUE_ERROR_ENCRYPT_FAILED:
                        alertpanel_error(_("Could not queue message for sending:\n\n"
-                                               "Encryption failed: %s"), privacy_get_error());
+                                               "Encryption failed: %s"),
+                                       privacy_peek_error() ? privacy_get_error() : _("Unknown error"));
                        break;
                case COMPOSE_QUEUE_ERROR_CHAR_CONVERSION:
                        alertpanel_error(_("Could not queue message for sending:\n\n"