Fix part of bug #2885 (fprintf on a NULL file pointer)
authorRicardo Mones <ricardo@mones.org>
Sat, 6 Apr 2013 11:13:28 +0000 (13:13 +0200)
committerRicardo Mones <ricardo@mones.org>
Sat, 6 Apr 2013 11:13:28 +0000 (13:13 +0200)
src/plugins/newmail/newmail.c

index 268e3e8c026b162010a1471202f8588793dc0edc..54004a52c942c1842ac62b5c4d05f259937f81d6 100644 (file)
@@ -57,7 +57,8 @@ gboolean newmail_hook (gpointer source, gpointer data)
        auto MsgInfo    *msginfo = (MsgInfo *)source;
        auto FolderItem *tof;
 
-       if (!msginfo) return (FALSE);
+       if (!msginfo) return FALSE;
+       if (!NewLog) return FALSE;
 
        tof = msginfo->folder;
        (void)fprintf (NewLog, "---\n"