diff --git a/r5dev/networksystem/r5net.cpp b/r5dev/networksystem/r5net.cpp index 5a14a271..4c6bd289 100644 --- a/r5dev/networksystem/r5net.cpp +++ b/r5dev/networksystem/r5net.cpp @@ -34,7 +34,7 @@ std::vector R5Net::Client::GetServersList(std::string& svOutMessa httplib::Result htResults = m_HttpClient.Post("/servers", jsReqBody.dump().c_str(), jsReqBody.dump().length(), "application/json"); - if (r5net_show_debug->GetBool()) + if (htResults && r5net_show_debug->GetBool()) { DevMsg(eDLL_T::ENGINE, "GetServerList replied with '%d'.\n", htResults->status); } @@ -132,7 +132,7 @@ bool R5Net::Client::PostServerHost(std::string& svOutMessage, std::string& svOut httplib::Result htResults = m_HttpClient.Post("/servers/add", svRequestBody.c_str(), svRequestBody.length(), "application/json"); - if (r5net_show_debug->GetBool()) + if (htResults && r5net_show_debug->GetBool()) { DevMsg(eDLL_T::ENGINE, "PostServerHost replied with '%d'.\n", htResults->status); }