Fix crash if server lobby is NULL
This commit is contained in:
parent
a5c9bbd3ef
commit
3cdc1b6ddd
@ -924,8 +924,10 @@ void ServerLobby::checkIncomingConnectionRequests()
|
|||||||
const XMLNode * users_xml = result->getNode("users");
|
const XMLNode * users_xml = result->getNode("users");
|
||||||
std::map<uint32_t, KeyData> keys;
|
std::map<uint32_t, KeyData> keys;
|
||||||
auto sl = m_server_lobby.lock();
|
auto sl = m_server_lobby.lock();
|
||||||
if (!sl || (sl->m_state.load() != WAITING_FOR_START_GAME &&
|
if (!sl)
|
||||||
!sl->allowJoinedPlayersWaiting()))
|
return;
|
||||||
|
if (sl->m_state.load() != WAITING_FOR_START_GAME &&
|
||||||
|
!sl->allowJoinedPlayersWaiting())
|
||||||
{
|
{
|
||||||
sl->replaceKeys(keys);
|
sl->replaceKeys(keys);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user