Avoid dereferencing potential null value

This commit is contained in:
Travis Cross 2013-05-28 03:55:48 +00:00
parent 9ce4be3daa
commit 5e7485ff20
1 changed files with 1 additions and 1 deletions

View File

@ -275,7 +275,7 @@ ESL_DECLARE(char *) esl_event_get_header_idx(esl_event_t *event, const char *hea
}
return hp->value;
} else if (!strcmp(header_name, "_body")) {
} else if (header_name && !strcmp(header_name, "_body")) {
return event->body;
}