fixed server crash bug

This commit is contained in:
Max-Wilhelm Bruker
2010-01-18 13:11:18 +01:00
parent b1e8f08ebe
commit 9c4264b491
5 changed files with 7 additions and 3 deletions

View File

@@ -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;