diff options
-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(); |