Fix #12655, 4f6d75f: inconsistent state in client list and potential crash after client leaves

(cherry picked from commit f939e81bf0aef5bdb1cf825536418f17e81b85a3)
This commit is contained in:
Rubidium
2024-05-11 21:39:14 +02:00
committed by Jonathan G Rennison
parent f62eb72fcb
commit 1d13ac7280

View File

@@ -215,6 +215,8 @@ ServerNetworkGameSocketHandler::~ServerNetworkGameSocketHandler()
this->savegame->Destroy();
this->savegame = nullptr;
}
InvalidateWindowData(WC_CLIENT_LIST, 0);
}
bool ServerNetworkGameSocketHandler::ParseKeyPasswordPacket(Packet &p, NetworkSharedSecrets &ss, const std::string &password, std::string *payload, size_t length)
@@ -336,8 +338,6 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::CloseConnection(NetworkRecvSta
this->DeferDeletion();
InvalidateWindowData(WC_CLIENT_LIST, 0);
return status;
}