Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Oct 24, 2023
1 parent bef3bb0 commit 862980b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/creatures/monsters/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,11 @@ void Monster::onFollowCreatureComplete(std::shared_ptr<Creature> creature) {
}

const auto &it = getTargetInterator(creature);
if (it != targetList.end()) {
const auto &target = (*it).lock();
if (!target) {
return;
}
if (it == targetList.end()) {
return;
}

if (const auto &target = (*it).lock()) {
targetList.erase(it);

if (hasFollowPath) {
Expand Down

0 comments on commit 862980b

Please sign in to comment.