Check for null in DNS handler

PUBLISHED_FROM=e8b719d491688032e6395b75d5859ffad7d7ea23
This commit is contained in:
Alexander Alashkin 2016-04-19 09:17:32 +01:00 committed by rojer
parent 083d398631
commit 56c687b39b

View File

@ -9357,10 +9357,14 @@ static void mg_resolve_async_eh(struct mg_connection *nc, int ev, void *data) {
struct mg_resolve_async_request *req;
struct mg_dns_message *msg;
DBG(("ev=%d", ev));
DBG(("ev=%d user_data=%p", ev, nc->user_data));
req = (struct mg_resolve_async_request *) nc->user_data;
if (req == NULL) {
return;
}
switch (ev) {
case MG_EV_CONNECT:
case MG_EV_POLL: