Skip to content

Commit

Permalink
fix wrong if in actor removal
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonchu committed Jan 20, 2024
1 parent 7f142d1 commit 9e30f7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GameBall/core/game_ball.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ void GameBall::OnCleanup() {

auto remove_actor_pointer = actors_.at(actor_id);
actors_.erase(actor_id);
if (!remove_actor_pointer)
if (remove_actor_pointer)
delete remove_actor_pointer;
}

Expand Down Expand Up @@ -453,7 +453,7 @@ void GameBall::OnUpdate() {
auto remove_actor_pointer = actors_.at(actor_id);
actors_.erase(actor_id);
// delete actor;
if (!remove_actor_pointer)
if (remove_actor_pointer)
delete remove_actor_pointer;
}

Expand Down

0 comments on commit 9e30f7f

Please sign in to comment.