summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/pets.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp
index 7e2c849ac..ef544d88a 100644
--- a/src/actions/pets.cpp
+++ b/src/actions/pets.cpp
@@ -61,7 +61,10 @@ static const Being *getPet()
return *pets.begin();
}
#endif
- return PlayerInfo::getPetBeing();
+ const int id = PlayerInfo::getPetBeingId();
+ if (!id)
+ return nullptr;
+ return actorManager->findBeing(id);
}
impHandler(commandEmotePet)