summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 40d20fe98..047d351fc 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -259,7 +259,11 @@ Being::~Being()
delete2(mChat);
if (mOwner)
- mOwner->unassignPet(this);
+ {
+ if (mType == ActorType::LocalPet)
+ mOwner->unassignPet(this);
+ mOwner = nullptr;
+ }
FOR_EACH (std::vector<Being*>::iterator, it, mPets)
{
Being *pet = *it;