summaryrefslogtreecommitdiff
path: root/src/gui/emoteshortcutcontainer.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-16 09:22:35 -0700
committerIra Rice <irarice@gmail.com>2009-01-16 09:22:35 -0700
commitd78fb807d9b3a985d7c9b79ae29e6642dc831a5f (patch)
tree0eed2a84dd2408741cebe0676d82e58d33141c20 /src/gui/emoteshortcutcontainer.cpp
parent9639b93433510e6fb33b39644413fd28d4762b36 (diff)
downloadmana-client-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.tar.gz
mana-client-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.tar.bz2
mana-client-d78fb807d9b3a985d7c9b79ae29e6642dc831a5f.tar.xz
mana-client-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.cpp2
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();