Try to make crash in #1529 unlikely - though it needs a proper fix still.

This commit is contained in:
hiker 2014-09-22 23:57:37 +10:00
parent 99fd49bdc0
commit a550f6bf6b

View File

@ -95,7 +95,9 @@ void* waitInput(void* data)
clrp->voteRaceCount(cnt);
}
}
else if (NetworkManager::getInstance()->getPeers().size() > 0)
// If STK shuts down, but should receive an input after the network
// manager was deleted, the getInstance call will return NULL.
else if (NetworkManager::getInstance() && NetworkManager::getInstance()->getPeers().size() > 0)
{
NetworkString msg;
msg.ai8(0);