From: Vsevolod Stakhov Date: Thu, 22 Nov 2018 14:17:10 +0000 (+0000) Subject: [Minor] Check pointer before usage X-Git-Tag: 1.8.3~74 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0e1095a4845012a4b90eb2627d1627fefbe633fb;p=rspamd.git [Minor] Check pointer before usage --- diff --git a/src/lua/lua_mimepart.c b/src/lua/lua_mimepart.c index c672591bf..a6fc2bfa5 100644 --- a/src/lua/lua_mimepart.c +++ b/src/lua/lua_mimepart.c @@ -1377,7 +1377,7 @@ lua_mimepart_is_attachment (lua_State * L) lua_pushboolean (L, true); } else { - if (part->cd->filename.len > 0) { + if (part->cd && part->cd->filename.len > 0) { /* We still have filename and it is not an image */ lua_pushboolean (L, true); }