aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libmime/message.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index a9dbdb245..4b2330ed2 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -700,8 +700,11 @@ rspamd_message_parse (struct rspamd_task *task)
if (!task->subject) {
hdrs = rspamd_message_get_header_array (task, "Subject", FALSE);
- rh = g_ptr_array_index (hdrs, 0);
- task->subject = rh->decoded;
+
+ if (hdrs) {
+ rh = g_ptr_array_index (hdrs, 0);
+ task->subject = rh->decoded;
+ }
}
debug_task ("found %ud parts in message", task->parts->len);