mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
- alittle more bullet proofing using NULL pointer checks
This commit is contained in:
@@ -241,24 +241,28 @@ void ConnectionSlot::update(bool checkForNewClients) {
|
||||
if(hasOpenSlots == false) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] no open slots, disconnecting client\n",__FILE__,__FUNCTION__);
|
||||
|
||||
if(socket != NULL) {
|
||||
NetworkMessageIntro networkMessageIntro(getNetworkVersionString(), socket->getHostName(), playerIndex, nmgstNoSlots);
|
||||
sendMessage(&networkMessageIntro);
|
||||
}
|
||||
|
||||
close();
|
||||
}
|
||||
else {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] client will be assigned to the next open slot\n",__FILE__,__FUNCTION__);
|
||||
|
||||
if(socket != NULL) {
|
||||
NetworkMessageIntro networkMessageIntro(getNetworkVersionString(), socket->getHostName(), playerIndex, nmgstOk);
|
||||
sendMessage(&networkMessageIntro);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(socket->isConnected()) {
|
||||
if(socket != NULL && socket->isConnected()) {
|
||||
this->clearChatInfo();
|
||||
|
||||
bool gotTextMsg = true;
|
||||
|
Reference in New Issue
Block a user