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) | |
download | libmicrohttpd-22e9f3c1dc58f10c005a71adb9e66d5700dc15d4.tar.gz libmicrohttpd-22e9f3c1dc58f10c005a71adb9e66d5700dc15d4.zip |
-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, | |||
3170 | unsigned int status_code, | 3170 | unsigned int status_code, |
3171 | struct MHD_Response *response) | 3171 | struct MHD_Response *response) |
3172 | { | 3172 | { |
3173 | struct MHD_Daemon *daemon = connection->daemon; | 3173 | struct MHD_Daemon *daemon; |
3174 | 3174 | ||
3175 | if ( (NULL == connection) || | 3175 | if ( (NULL == connection) || |
3176 | (NULL == response) || | 3176 | (NULL == response) || |
@@ -3187,6 +3187,7 @@ MHD_queue_response (struct MHD_Connection *connection, | |||
3187 | #endif | 3187 | #endif |
3188 | return MHD_NO; | 3188 | return MHD_NO; |
3189 | } | 3189 | } |
3190 | daemon = connection->daemon; | ||
3190 | if ( (NULL != response->upgrade_handler) && | 3191 | if ( (NULL != response->upgrade_handler) && |
3191 | (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && | 3192 | (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) && |
3192 | (0 == (daemon->options & MHD_USE_SUSPEND_RESUME)) ) | 3193 | (0 == (daemon->options & MHD_USE_SUSPEND_RESUME)) ) |