mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 11:42:31 +01:00
- small coverity fix
This commit is contained in:
parent
d08eacacc8
commit
b5d609586a
@ -765,7 +765,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
|||||||
GameNetworkInterface *gameNetworkInterface= NetworkManager::getInstance().getGameNetworkInterface();
|
GameNetworkInterface *gameNetworkInterface= NetworkManager::getInstance().getGameNetworkInterface();
|
||||||
if(gameNetworkInterface != NULL) {
|
if(gameNetworkInterface != NULL) {
|
||||||
ServerInterface *server = networkManager.getServerInterface();
|
ServerInterface *server = networkManager.getServerInterface();
|
||||||
if(server->isClientConnected(playerIndex) == true) {
|
if(server != NULL && server->isClientConnected(playerIndex) == true) {
|
||||||
|
|
||||||
MutexSafeWrapper safeMutex(server->getSlotMutex(playerIndex),CODE_AT_LINE);
|
MutexSafeWrapper safeMutex(server->getSlotMutex(playerIndex),CODE_AT_LINE);
|
||||||
ConnectionSlot *slot = server->getSlot(playerIndex,false);
|
ConnectionSlot *slot = server->getSlot(playerIndex,false);
|
||||||
@ -776,6 +776,7 @@ void Commander::giveNetworkCommand(NetworkCommand* networkCommand) const {
|
|||||||
sleep(5);
|
sleep(5);
|
||||||
|
|
||||||
//printf("Sending nctDisconnectNetworkPlayer\n");
|
//printf("Sending nctDisconnectNetworkPlayer\n");
|
||||||
|
server = networkManager.getServerInterface(false);
|
||||||
if(server != NULL) {
|
if(server != NULL) {
|
||||||
MutexSafeWrapper safeMutex2(server->getSlotMutex(playerIndex),CODE_AT_LINE);
|
MutexSafeWrapper safeMutex2(server->getSlotMutex(playerIndex),CODE_AT_LINE);
|
||||||
slot = server->getSlot(playerIndex,false);
|
slot = server->getSlot(playerIndex,false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user