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
ba34b60e
Commit
ba34b60e
authored
Dec 10, 2010
by
Max-Wilhelm Bruker
Browse files
server crash fix
parent
f2473be5
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/server_protocolhandler.cpp
View file @
ba34b60e
...
@@ -594,7 +594,9 @@ ResponseCode Server_ProtocolHandler::moveCard(Server_Game *game, Server_Player *
...
@@ -594,7 +594,9 @@ ResponseCode Server_ProtocolHandler::moveCard(Server_Game *game, Server_Player *
if
(
card
->
getParentCard
())
if
(
card
->
getParentCard
())
card
->
setParentCard
(
0
);
card
->
setParentCard
(
0
);
const
QList
<
Server_Card
*>
&
attachedCards
=
card
->
getAttachedCards
();
// DO NOT save a reference to the list, but make a real copy.
// The contents of the original list change during the loop.
const
QList
<
Server_Card
*>
attachedCards
=
card
->
getAttachedCards
();
for
(
int
i
=
0
;
i
<
attachedCards
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
attachedCards
.
size
();
++
i
)
unattachCard
(
game
,
attachedCards
[
i
]
->
getZone
()
->
getPlayer
(),
cont
,
attachedCards
[
i
]);
unattachCard
(
game
,
attachedCards
[
i
]
->
getZone
()
->
getPlayer
(),
cont
,
attachedCards
[
i
]);
...
...
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