]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Check pointer before usage
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Nov 2018 14:17:10 +0000 (14:17 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 22 Nov 2018 14:17:10 +0000 (14:17 +0000)
src/lua/lua_mimepart.c

index c672591bfbf20470b3294e5718590a8c346441f7..a6fc2bfa5a744e01318b964f46c3db0afb3d06c0 100644 (file)
@@ -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);
                        }