diff options
author | RealBadAngel <maciej.kasatkin@o2.pl> | 2014-06-17 18:18:55 +0200 |
---|---|---|
committer | RealBadAngel <maciej.kasatkin@o2.pl> | 2014-06-18 14:53:43 +0200 |
commit | c380563a12d82603255e271af005e042bde0d42d (patch) | |
tree | 5bb9ad306cccd724a3315ba21ce312fc4bc85f3c | |
parent | c0e4551249dcc1e09ee09877f136ce12fe359520 (diff) | |
download | minetest-c380563a12d82603255e271af005e042bde0d42d.tar.gz minetest-c380563a12d82603255e271af005e042bde0d42d.tar.bz2 minetest-c380563a12d82603255e271af005e042bde0d42d.zip |
Fix issue #1275 - one more missing check.
-rw-r--r-- | src/serverobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/serverobject.cpp b/src/serverobject.cpp index 95735de17..81307bc34 100644 --- a/src/serverobject.cpp +++ b/src/serverobject.cpp @@ -78,7 +78,7 @@ ItemStack ServerActiveObject::getWieldedItem() const if(inv) { const InventoryList *list = inv->getList(getWieldList()); - if(list) + if(list && (getWieldIndex() < (s32)list->getSize())) return list->getItem(getWieldIndex()); } return ItemStack(); |