Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
28a77f10
Commit
28a77f10
authored
Oct 01, 2010
by
Max-Wilhelm Bruker
Browse files
Server crash fix
parent
dccb352b
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_protocolhandler.cpp
View file @
28a77f10
...
...
@@ -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
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment