mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 23:00:24 -08:00
fixed server crash bug
This commit is contained in:
@@ -274,6 +274,9 @@ ResponseCode Server_ProtocolHandler::cmdCreateGame(Command_CreateGame *cmd)
|
||||
|
||||
ResponseCode Server_ProtocolHandler::cmdJoinGame(Command_JoinGame *cmd)
|
||||
{
|
||||
if (games.contains(cmd->getGameId()))
|
||||
return RespContextError;
|
||||
|
||||
Server_Game *g = server->getGame(cmd->getGameId());
|
||||
if (!g)
|
||||
return RespNameNotFound;
|
||||
|
||||
Reference in New Issue
Block a user