aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/html.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/html.lua b/rules/html.lua
index 3ceaed672..c2635a8d0 100644
--- a/rules/html.lua
+++ b/rules/html.lua
@@ -78,7 +78,7 @@ rspamd_config.R_EMPTY_IMAGE = {
local hc = p:get_html() -- we get HTML context
local len = p:get_length() -- and part's length
- if len < 50 then -- if we have a part that has less than 50 bytes of text
+ if hc and len < 50 then -- if we have a part that has less than 50 bytes of text
local images = hc:get_images() -- then we check for HTML images
if images then -- if there are images