summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-01-11 03:52:55 +0200
committerAndrei Karas <akaras@inbox.ru>2011-01-11 03:52:55 +0200
commit6b47d5c07c40a5ae3f4b4df147e7d89aa94f2304 (patch)
tree61362b8df33a46c6541078495edf8109f132b2e6
parentd3e3789ee54b7390b870a286c0bd7d74702a2aa2 (diff)
downloadmanaverse-6b47d5c07c40a5ae3f4b4df147e7d89aa94f2304.tar.gz
manaverse-6b47d5c07c40a5ae3f4b4df147e7d89aa94f2304.tar.bz2
manaverse-6b47d5c07c40a5ae3f4b4df147e7d89aa94f2304.tar.xz
manaverse-6b47d5c07c40a5ae3f4b4df147e7d89aa94f2304.zip
Add missing check to itemcontainer.cpp
-rw-r--r--src/gui/widgets/itemcontainer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 0ba676fe5..b9123bc5a 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -434,6 +434,9 @@ void ItemContainer::updateMatrix()
int ItemContainer::getSlotIndex(int x, int y) const
{
+ if (!mShowMatrix)
+ return Inventory::NO_SLOT_INDEX;
+
if (x < getWidth() && y < getHeight())
{
int idx = (y / BOX_HEIGHT) * mGridColumns + (x / BOX_WIDTH);