summaryrefslogtreecommitdiff
path: root/src/progs/manaplus/actions/pets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/manaplus/actions/pets.cpp')
-rw-r--r--src/progs/manaplus/actions/pets.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/progs/manaplus/actions/pets.cpp b/src/progs/manaplus/actions/pets.cpp
index bb8ec4591..fd8c959f8 100644
--- a/src/progs/manaplus/actions/pets.cpp
+++ b/src/progs/manaplus/actions/pets.cpp
@@ -102,9 +102,11 @@ impHandler(petEmote)
if (event.action >= InputAction::PET_EMOTE_1
&& event.action <= InputAction::PET_EMOTE_48)
{
- const int emotion = event.action - InputAction::PET_EMOTE_1;
if (emoteShortcut != nullptr)
+ {
+ const int emotion = event.action - InputAction::PET_EMOTE_1;
petHandler->emote(emoteShortcut->getEmote(emotion));
+ }
if (Game::instance() != nullptr)
Game::instance()->setValidSpeed();
return true;