Fix missing check
authorColin Leroy <colin@colino.net>
Thu, 8 Oct 2015 17:23:15 +0000 (19:23 +0200)
committerColin Leroy <colin@colino.net>
Thu, 8 Oct 2015 17:23:15 +0000 (19:23 +0200)
src/textview.c

index a6cceaa..5962823 100644 (file)
@@ -1079,8 +1079,10 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
                filename = procmime_get_tmp_file_name(mimeinfo);
                if (procmime_get_part(filename, mimeinfo) == 0) {
                        tmpfp = g_fopen(filename, "rb");
-                       textview_show_html(textview, tmpfp, conv);
-                       fclose(tmpfp);
+                       if (tmpfp) {
+                               textview_show_html(textview, tmpfp, conv);
+                               fclose(tmpfp);
+                       }
                        claws_unlink(filename);
                }
                g_free(filename);