From 25706e4ab74f3ec3fbacde3dac25f421f5ada279 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 24 Mar 2015 13:12:38 +0300 Subject: Fix possible issue on exit. --- src/being/actorsprite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/being/actorsprite.cpp') 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. -- cgit v1.2.3-70-g09d2