Skip to content

Commit 4dec4e0

Browse files
salix5Copilot
andauthored
Fix ClientField::DestroyCard
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 9f880c1 commit 4dec4e0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

gframe/client_field.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ ClientCard* ClientField::CreateCard() {
103103
void ClientField::DestroyCard(ClientCard* pcard) {
104104
if (!pcard)
105105
return;
106+
overlay_cards.erase(pcard);
106107
auto it = std::find_if(cards_.begin(), cards_.end(),
107108
[pcard](const std::unique_ptr<ClientCard>& ptr) {
108109
return ptr.get() == pcard;

0 commit comments

Comments
 (0)