mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
extra check in cry() for NULL context
This commit is contained in:
1 parent
9aad922983
commit
358e4ffbf5
1 file changed
+1
-1
+1
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user