summaryrefslogtreecommitdiff
path: root/src/being/actorsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r--src/being/actorsprite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 31e8ce7be..9055e3a40 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -83,7 +83,7 @@ ActorSprite::~ActorSprite()
mUsedTargetCursor = nullptr;
- if (localPlayer && localPlayer->getTarget() == this)
+ if (localPlayer && localPlayer != this && localPlayer->getTarget() == this)
localPlayer->setTarget(nullptr);
// Notify listeners of the destruction.