summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 4243c5a6f..9092b0750 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -297,6 +297,8 @@ Being::~Being()
delete mText;
mText = nullptr;
+ delete mEmotionSprite;
+ mEmotionSprite = nullptr;
delete mAnimationEffect;
mAnimationEffect = nullptr;
}
@@ -2744,7 +2746,10 @@ void Being::setEmote(const uint8_t emotion, const int emote_time)
{
const int emotionIndex = emotion - 1;
if (emotionIndex >= 0 && emotionIndex <= EmoteDB::getLast())
+ {
+ delete mEmotionSprite;
mEmotionSprite = EmoteDB::getClone(emotionIndex, true);
+ }
if (mEmotionSprite)
{