diff options
Diffstat (limited to 'src/gui/itemshortcutcontainer.cpp')
-rw-r--r-- | src/gui/itemshortcutcontainer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/itemshortcutcontainer.cpp b/src/gui/itemshortcutcontainer.cpp index a54e3678..23b41650 100644 --- a/src/gui/itemshortcutcontainer.cpp +++ b/src/gui/itemshortcutcontainer.cpp @@ -76,6 +76,8 @@ ItemShortcutContainer::draw(gcn::Graphics *graphics) { Graphics *g = static_cast<Graphics*>(graphics); + graphics->setFont(getFont()); + for (int i = 0; i < mMaxItems; i++) { const int itemX = (i % mGridWidth) * mBoxWidth; @@ -149,6 +151,8 @@ ItemShortcutContainer::mouseDragged(gcn::MouseEvent &event) if (index == -1) { return; } + if (itemShortcut->getItem(index) < 0) + return; Item *item = player_node->searchForItem(itemShortcut->getItem(index)); if (item) { |