talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit bf3b50ead3cabfa24dc85a1553e213510008965a
parent 277798d5a492464a54d54c8c5d22c17dd41b6bd9
Author: Colin Leroy <colin@colino.net>
Date:   Fri, 28 Sep 2018 10:29:27 +0200

Fix possible null-dereference (thanks Coverity)

Diffstat:
Msrc/messageview.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/messageview.c b/src/messageview.c @@ -1269,8 +1269,8 @@ static gboolean messageview_try_select_mimeinfo(MessageView *messageview, MsgInf return TRUE; } else if (!strcasecmp(mimeinfo->subtype, "html") && mimeinfo->disposition != DISPOSITIONTYPE_ATTACHMENT - && (msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_ALWAYS - || (msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_DEFAULT + && ((msginfo->folder && msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_ALWAYS) + || ((msginfo->folder && msginfo->folder->prefs->promote_html_part == HTML_PROMOTE_DEFAULT) && prefs_common.promote_html_part))) { mimeview_select_mimepart_icon(messageview->mimeview, mimeinfo); return TRUE;