diff options
author | Jeffrey Stedfast <fejj@helixcode.com> | 2000-10-25 02:48:17 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2000-10-25 02:48:17 +0800 |
commit | 293ac91a07750088754b7ad4571550b4e3cf18dd (patch) | |
tree | 0bbd329035ed681e7e2a4633fe97ac85fb655340 | |
parent | a33754096884e7a5c57ad53ed22f4fae4c1439ad (diff) | |
download | gsoc2013-evolution-293ac91a07750088754b7ad4571550b4e3cf18dd.tar.gz gsoc2013-evolution-293ac91a07750088754b7ad4571550b4e3cf18dd.tar.zst gsoc2013-evolution-293ac91a07750088754b7ad4571550b4e3cf18dd.zip |
Fixed NULL in fprintf.
2022-10-24 Jeffrey Stedfast <fejj@helixcode.com>
* filter-driver.c: Fixed NULL in fprintf.
svn path=/trunk/; revision=6150
-rw-r--r-- | filter/ChangeLog | 4 | ||||
-rw-r--r-- | filter/filter-driver.c | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog index ff710109bc..1e80d11b1e 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,7 @@ +2022-10-24 Jeffrey Stedfast <fejj@helixcode.com> + + * filter-driver.c: Fixed NULL in fprintf. + 2000-10-24 Dan Winship <danw@helixcode.com> * Makefile.am (libfilter-i18n.h): Build a fake header file with diff --git a/filter/filter-driver.c b/filter/filter-driver.c index 9bff98fac4..369d3573e2 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -484,12 +484,19 @@ filter_driver_status_log (FilterDriver *driver, enum filter_status_t status, /* write log header */ time_t t; char date[50]; + char *from = NULL; + char *subject = NULL; + + if (msg) { + from = camel_mime_message_get_from(msg); + subject = camel_mime_message_get_subject(msg); + } time (&t); strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t)); fprintf (out, " - Applied filter \"%s\" to message from %s - \"%s\" at %s\n", - desc, msg ? camel_mime_message_get_from (msg) : "unknown", - msg ? camel_mime_message_get_subject (msg) : "", date); + desc, from ? from : "unknown", + subject ? subject : "", date); break; } case FILTER_STATUS_START: |