Fix crash when creating and destroying a TopMenu without map change (bug 6303).

This commit is contained in:
Nicholas Hastings 2015-02-04 09:57:04 -08:00
parent 7e9b22cb6e
commit 10c62dc0c0

View File

@ -80,12 +80,15 @@ TopMenu::~TopMenu()
delete m_Config.cats[i];
}
/* Sweep players */
for (size_t i = 0; i <= (size_t)m_max_clients; i++)
if (m_clients != NULL)
{
TearDownClient(&m_clients[i]);
/* Sweep players */
for (size_t i = 0; i <= (size_t)m_max_clients; i++)
{
TearDownClient(&m_clients[i]);
}
free(m_clients);
}
free(m_clients);
}
unsigned int TopMenu::CalcMemUsage()