Fix crash when searching for users fails. Does not fix the search, only fixes STK crashing when errors occur

This commit is contained in:
auria.mg 2018-09-18 19:20:19 -04:00
parent 52f5562be8
commit afe2b6f2f4

View File

@ -136,6 +136,11 @@ void OnlineUserSearch::parseResult(const XMLNode * input)
{
m_users.clear();
const XMLNode * users_xml = input->getNode("users");
if (users_xml == NULL)
{
Log::warn("OnlineSearch", "No users in server response.");
return;
}
// Try to reserve enough cache space for all found entries.
unsigned int n = ProfileManager::get()