diff options
author | Ira Rice <irarice@gmail.com> | 2009-01-16 09:22:35 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-16 09:22:35 -0700 |
commit | d78fb807d9b3a985d7c9b79ae29e6642dc831a5f (patch) | |
tree | 0eed2a84dd2408741cebe0676d82e58d33141c20 /src/gui/emoteshortcutcontainer.cpp | |
parent | 9639b93433510e6fb33b39644413fd28d4762b36 (diff) | |
download | mana-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.tar.gz mana-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.tar.bz2 mana-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.tar.xz mana-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.zip |
Fixed a potential crash when the emotes aren't loaded, or there are less
than 12 emotes.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/emoteshortcutcontainer.cpp')
-rw-r--r-- | src/gui/emoteshortcutcontainer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/emoteshortcutcontainer.cpp b/src/gui/emoteshortcutcontainer.cpp index a7347bb0..f7917f85 100644 --- a/src/gui/emoteshortcutcontainer.cpp +++ b/src/gui/emoteshortcutcontainer.cpp @@ -60,7 +60,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): mEmoteImg.push_back(player_node->getEmote(i)); } - mMaxItems = MAX_ITEMS; + mMaxItems = EmoteDB::getLast() < MAX_ITEMS ? EmoteDB::getLast() : MAX_ITEMS; mBoxHeight = mBackgroundImg->getHeight(); mBoxWidth = mBackgroundImg->getWidth(); |