[evolution/gnome-3-16] Bug 751092 - Crash on message save with empty From override address



commit 11e0719e3698787e7d0d1ea1a685586907a06335
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jun 17 12:22:29 2015 +0200

    Bug 751092 - Crash on message save with empty From override address

 composer/e-msg-composer.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 744cb54..4c903de 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -551,7 +551,7 @@ build_message_headers (EMsgComposer *composer,
                EComposerHeader *composer_header;
                const gchar *extension_name;
                const gchar *header_name;
-               const gchar *name, *address;
+               const gchar *name, *address = NULL;
                const gchar *transport_uid;
                const gchar *sent_folder;
 
@@ -559,7 +559,12 @@ build_message_headers (EMsgComposer *composer,
                if (e_composer_from_header_get_override_visible (E_COMPOSER_FROM_HEADER (composer_header))) {
                        name = e_composer_header_table_get_from_name (table);
                        address = e_composer_header_table_get_from_address (table);
-               } else {
+
+                       if (address && !*address)
+                               address = NULL;
+               }
+
+               if (!address) {
                        ESourceMailIdentity *mail_identity;
 
                        mail_identity = e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_IDENTITY);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]