1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-08-13 16:53:49 -04:00

Fix issue #1275 - one more missing check.

This commit is contained in:
RealBadAngel 2014-06-17 18:18:55 +02:00
parent c0e4551249
commit c380563a12

View File

@ -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();