diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-07 21:35:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-07 21:38:22 +0300 |
commit | 9ca7ca7619ae242fc1907aaea8d631d601ea1091 (patch) | |
tree | 146f953389b991e10d9a2bb55b06c600567ba358 /src | |
parent | a9732d3ad6115ad7d590e819631dfbd764d13d3e (diff) | |
download | manaplus-9ca7ca7619ae242fc1907aaea8d631d601ea1091.tar.gz manaplus-9ca7ca7619ae242fc1907aaea8d631d601ea1091.tar.bz2 manaplus-9ca7ca7619ae242fc1907aaea8d631d601ea1091.tar.xz manaplus-9ca7ca7619ae242fc1907aaea8d631d601ea1091.zip |
Fix emote leak from commit 4ad3a8e89e64ce3ae845d2786dd433ab2682393e
Diffstat (limited to 'src')
-rw-r--r-- | src/being.cpp | 5 |
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) { |