Fix issue #1275 - one more missing check.
parent
c0e4551249
commit
c380563a12
|
@ -78,7 +78,7 @@ ItemStack ServerActiveObject::getWieldedItem() const
|
||||||
if(inv)
|
if(inv)
|
||||||
{
|
{
|
||||||
const InventoryList *list = inv->getList(getWieldList());
|
const InventoryList *list = inv->getList(getWieldList());
|
||||||
if(list)
|
if(list && (getWieldIndex() < (s32)list->getSize()))
|
||||||
return list->getItem(getWieldIndex());
|
return list->getItem(getWieldIndex());
|
||||||
}
|
}
|
||||||
return ItemStack();
|
return ItemStack();
|
||||||
|
|
Loading…
Reference in New Issue