aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libmime/mime_headers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c
index 76ae1770a..b819f0ec5 100644
--- a/src/libmime/mime_headers.c
+++ b/src/libmime/mime_headers.c
@@ -907,6 +907,10 @@ rspamd_message_get_header_from_hash (struct rspamd_mime_headers_table *hdrs,
const gchar *field,
gboolean need_modified)
{
+ if (hdrs == NULL) {
+ return NULL;
+ }
+
khiter_t k;
khash_t(rspamd_mime_headers_htb) *htb = &hdrs->htb;
struct rspamd_mime_header *hdr;