Skip to content

Commit

Permalink
Fix issue #1275 - one more missing check.
Browse files Browse the repository at this point in the history
  • Loading branch information
RealBadAngel committed Jun 18, 2014
1 parent c0e4551 commit c380563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serverobject.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit c380563

Please sign in to comment.