talons

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

commit d15c76ad8978cea678fe5a262b558e6eda2753be
parent 029c9c58d48e7784950e252e9b4f2e30dc9c9aef
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;