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
5f32892e
Unverified
Commit
5f32892e
authored
May 12, 2021
by
ebbit1q
Committed by
GitHub
May 12, 2021
Browse files
check if player is null when updating card menu (#4346)
parent
ae743775
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/tab_game.cpp
View file @
5f32892e
...
...
@@ -1412,12 +1412,15 @@ Player *TabGame::getActiveLocalPlayer() const
void
TabGame
::
updateCardMenu
(
AbstractCardItem
*
card
)
{
Player
*
p
;
if
((
clients
.
size
()
>
1
)
||
!
players
.
contains
(
localPlayerId
))
p
=
card
->
getOwner
();
else
p
=
players
.
value
(
localPlayerId
);
p
->
updateCardMenu
(
static_cast
<
CardItem
*>
(
card
));
Player
*
player
;
if
((
clients
.
size
()
>
1
)
||
!
players
.
contains
(
localPlayerId
))
{
player
=
card
->
getOwner
();
}
else
{
player
=
players
.
value
(
localPlayerId
);
}
if
(
player
!=
nullptr
)
{
player
->
updateCardMenu
(
static_cast
<
CardItem
*>
(
card
));
}
}
void
TabGame
::
createMenuItems
()
...
...
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