mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +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.
|
// same way string option can.
|
||||||
conn->log_message = buf;
|
conn->log_message = buf;
|
||||||
if (call_user(conn, MG_EVENT_LOG) == NULL) {
|
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+");
|
mg_fopen(conn->ctx->config[ERROR_LOG_FILE], "a+");
|
||||||
|
|
||||||
if (fp != NULL) {
|
if (fp != NULL) {
|
||||||
|
|||||||
Reference in new issue
Block a user