Check peer first to avoid crash
This commit is contained in:
parent
11897da80c
commit
3b75740163
@ -4561,10 +4561,10 @@ bool ServerLobby::checkPeersReady(bool ignore_ai_peer) const
|
|||||||
for (auto p : m_peers_ready)
|
for (auto p : m_peers_ready)
|
||||||
{
|
{
|
||||||
auto peer = p.first.lock();
|
auto peer = p.first.lock();
|
||||||
if (ignore_ai_peer && peer->isAIPeer())
|
|
||||||
continue;
|
|
||||||
if (!peer)
|
if (!peer)
|
||||||
continue;
|
continue;
|
||||||
|
if (ignore_ai_peer && peer->isAIPeer())
|
||||||
|
continue;
|
||||||
all_ready = all_ready && p.second;
|
all_ready = all_ready && p.second;
|
||||||
if (!all_ready)
|
if (!all_ready)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user