Commit 358e4ffb authored by Sergey Lyubka's avatar Sergey Lyubka

extra check in cry() for NULL context

parent 9aad9229
......@@ -584,7 +584,7 @@ static void cry(struct mg_connection *conn, const char *fmt, ...) {
// same way string option can.
conn->log_message = buf;
if (call_user(conn, MG_EVENT_LOG) == NULL) {
fp = conn->ctx->config[ERROR_LOG_FILE] == NULL ? NULL :
fp = conn->ctx == NULL || conn->ctx->config[ERROR_LOG_FILE] == NULL ? NULL :
mg_fopen(conn->ctx->config[ERROR_LOG_FILE], "a+");
if (fp != NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment