mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Server crash fix
This commit is contained in:
parent
dccb352b9e
commit
28a77f10e4
1 changed files with 4 additions and 0 deletions
|
|
@ -825,6 +825,8 @@ ResponseCode Server_ProtocolHandler::cmdCreateArrow(Command_CreateArrow *cmd, Co
|
|||
if (!startZone || (!targetZone && !playerTarget))
|
||||
return RespNameNotFound;
|
||||
Server_Card *startCard = startZone->getCard(cmd->getStartCardId(), false);
|
||||
if (!startCard)
|
||||
return RespNameNotFound;
|
||||
Server_Card *targetCard = 0;
|
||||
if (!playerTarget) {
|
||||
targetCard = targetZone->getCard(cmd->getTargetCardId(), false);
|
||||
|
|
@ -837,6 +839,8 @@ ResponseCode Server_ProtocolHandler::cmdCreateArrow(Command_CreateArrow *cmd, Co
|
|||
targetItem = targetPlayer;
|
||||
else
|
||||
targetItem = targetCard;
|
||||
if (!targetItem)
|
||||
return RespNameNotFound;
|
||||
|
||||
QMapIterator<int, Server_Arrow *> arrowIterator(player->getArrows());
|
||||
while (arrowIterator.hasNext()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue