diff src/readpst.c @ 247:85d77d7b034b

another patche from Kenneth Berland for solaris
author Carl Byington <carl@five-ten-sg.com>
date Fri, 07 May 2010 12:07:46 -0700
parents 5a82d41c883d
children fb66d428347d
line wrap: on
line diff
--- a/src/readpst.c	Thu May 06 15:28:46 2010 -0700
+++ b/src/readpst.c	Fri May 07 12:07:46 2010 -0700
@@ -1278,7 +1278,13 @@
     fprintf(f_output, "PRODID:LibPST v%s\n", VERSION);
     if (method) fprintf(f_output, "METHOD:%s\n", method);
     fprintf(f_output, "BEGIN:VEVENT\n");
-    if (sender) fprintf(f_output, "ORGANIZER;CN=\"%s\":MAILTO:%s\n", item->email->outlook_sender_name.str, sender);
+    if (sender) {
+        if (item->email->outlook_sender_name.str) {
+	    fprintf(f_output, "ORGANIZER;CN=\"%s\":MAILTO:%s\n", item->email->outlook_sender_name.str, sender);
+	} else {
+	    fprintf(f_output, "ORGANIZER;CN=\"\":MAILTO:%s\n", sender);
+	}
+    }
     write_appointment(f_output, item);
     fprintf(f_output, "END:VCALENDAR\n");
 }