diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-09-04 16:38:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-09-04 16:38:06 +0000 |
commit | 22e9f3c1dc58f10c005a71adb9e66d5700dc15d4 (patch) | |
tree | 7a0a8e2207b9d8d9be85a03e517c36fbf917a94e | |
parent | a1ad4d85055e4b3cea1f135c353f40fc66e809fc (diff) |
-check for NULL first
-rw-r--r-- | src/microhttpd/connection.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index c290851e..4677fa7a 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c @@ -3170,7 +3170,7 @@ MHD_queue_response (struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response) { - struct MHD_Daemon *daemon = connection->daemon; + struct MHD_Daemon *daemon; if ( (NULL == connection) || (NULL == response) || @@ -3187,6 +3187,7 @@ MHD_queue_response (struct MHD_Connection *connection, #endif return MHD_NO; } + daemon = connection->daemon; if ( (NULL != response->upgrade_handler) && (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && (0 == (daemon->options & MHD_USE_SUSPEND_RESUME)) ) |