Fix show sender using address book with no e-mail address in From:.
authorDarko Koruga <darko@users.sourceforge.net>
Fri, 20 Jul 2001 06:19:00 +0000 (06:19 +0000)
committerDarko Koruga <darko@users.sourceforge.net>
Fri, 20 Jul 2001 06:19:00 +0000 (06:19 +0000)
ChangeLog.claws
src/summaryview.c

index bd20342503bbaf49ca08628c66845552dddb46f4..7442f26917dd739237cba968f3b81ab85670a9c7 100644 (file)
@@ -1,3 +1,9 @@
+2001-07-20 [darko]
+
+       * src/summaryview.c
+               fix show sender using address book with no e-mail
+               address in From: field
+
 2001-07-19 [alfons]
 
        * src/matcher.[ch], src/filtering.c, src/prefs_filtering.c
index 7fa7232ec12dffd0b337f1ef6d21f53cbac840a6..7faf77b769d48d3667f40bfdef77772f7086c70b 100644 (file)
@@ -2159,13 +2159,15 @@ static void summary_set_header(gchar *text[], MsgInfo *msginfo)
                Xalloca(from, strlen(msginfo->from) + 1, return);
                strcpy(from, msginfo->from);
                extract_address(from);
-               count = complete_address(from);
-               if (count > 1) {
-                       g_free(from_name);
-                       from = get_complete_address(1);
-                       from_name = procheader_get_fromname(from);
-                       g_free(from);
-                       text[S_COL_FROM] = from_name;
+               if (*from) {
+                       count = complete_address(from);
+                       if (count > 1) {
+                               g_free(from_name);
+                               from = get_complete_address(1);
+                               from_name = procheader_get_fromname(from);
+                               g_free(from);
+                               text[S_COL_FROM] = from_name;
+                       }
                }
        }