diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-12 17:20:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-12 17:20:35 +0100 |
commit | 8e2facd1aaeaca370750185ba4b627e76140c02d (patch) | |
tree | 17af04c224ad254592779faff4c6e0217bde24e2 /src/libmime/message.h | |
parent | 290857ea8d7238183f8cee461847dded0ab57e47 (diff) | |
download | rspamd-8e2facd1aaeaca370750185ba4b627e76140c02d.tar.gz rspamd-8e2facd1aaeaca370750185ba4b627e76140c02d.zip |
[Project] Empty messages cases handling
Diffstat (limited to 'src/libmime/message.h')
-rw-r--r-- | src/libmime/message.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmime/message.h b/src/libmime/message.h index cc4db39f4..a6b6f1022 100644 --- a/src/libmime/message.h +++ b/src/libmime/message.h @@ -158,6 +158,9 @@ struct rspamd_message { }; #define MESSAGE_FIELD(task, field) ((task)->message->field) +#define MESSAGE_FIELD_CHECK(task, field) ((task)->message ? \ + (task)->message->field : \ + (__typeof__((task)->message->field))NULL) /** * Parse and pre-process mime message |