mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
- null pointer check when slots are switching in game lobby (thanks tomreyn)
This commit is contained in:
parent
52ffe988b7
commit
e15c5b48e3
@ -198,7 +198,8 @@ bool ServerInterface::switchSlot(int fromPlayerIndex, int toPlayerIndex) {
|
||||
MutexSafeWrapper safeMutex(&serverSynchAccessor,intToStr(__LINE__));
|
||||
MutexSafeWrapper safeMutexSlot(&slotAccessorMutexes[fromPlayerIndex],intToStr(__LINE__) + "_" + intToStr(fromPlayerIndex));
|
||||
MutexSafeWrapper safeMutexSlot2(&slotAccessorMutexes[toPlayerIndex],intToStr(__LINE__) + "_" + intToStr(toPlayerIndex));
|
||||
if(slots[toPlayerIndex]->isConnected() == false) {
|
||||
if(slots[toPlayerIndex] != NULL && slots[toPlayerIndex] != NULL &&
|
||||
slots[toPlayerIndex]->isConnected() == false) {
|
||||
slots[fromPlayerIndex]->setPlayerIndex(toPlayerIndex);
|
||||
slots[toPlayerIndex]->setPlayerIndex(fromPlayerIndex);
|
||||
ConnectionSlot *tmp = slots[toPlayerIndex];
|
||||
|
Loading…
x
Reference in New Issue
Block a user