Fix possible cur_ip nullptr usage in np_handler.cpp

This commit is contained in:
sampletext32 2020-05-12 18:54:31 +03:00 committed by Megamouse
parent 6374a9f19b
commit 86cf8a1717

View file

@ -69,7 +69,10 @@ np_handler::np_handler()
is_connected = false;
cur_ip = "0.0.0.0";
}
cur_ip = p;
else
{
cur_ip = p;
}
struct in_addr addr;
inet_pton(AF_INET, cur_ip.c_str(), &addr);