From: RealBadAngel Date: Tue, 17 Jun 2014 16:18:55 +0000 (+0200) Subject: Fix issue #1275 - one more missing check. X-Git-Tag: 0.4.10~76 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c380563a12d82603255e271af005e042bde0d42d;p=oweals%2Fminetest.git Fix issue #1275 - one more missing check. --- 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();