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
afe5c722
Commit
afe5c722
authored
Apr 22, 2012
by
Max-Wilhelm Bruker
Browse files
server crash fix
parent
0165ea61
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_player.cpp
View file @
afe5c722
...
...
@@ -331,7 +331,13 @@ ResponseCode Server_Player::moveCard(CommandContainer *cont, Server_CardZone *st
QList
<
QPair
<
Server_Card
*
,
int
>
>
cardsToMove
;
QMap
<
Server_Card
*
,
CardToMove
*>
cardProperties
;
QSet
<
int
>
cardIdsToMove
;
for
(
int
i
=
0
;
i
<
_cards
.
size
();
++
i
)
{
// The same card being moved twice would lead to undefined behaviour.
if
(
cardIdsToMove
.
contains
(
_cards
[
i
]
->
getCardId
()))
continue
;
cardIdsToMove
.
insert
(
_cards
[
i
]
->
getCardId
());
int
position
;
Server_Card
*
card
=
startzone
->
getCard
(
_cards
[
i
]
->
getCardId
(),
&
position
);
if
(
!
card
)
...
...
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