From: RealBadAngel Date: Tue, 17 Jun 2014 16:18:55 +0000 (+0200) Subject: Fix issue #1275 - one more missing check. X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=c380563a12d82603255e271af005e042bde0d42d;p=zefram%2Fminetest%2Fminetest_engine.git Fix issue #1275 - one more missing check. --- diff --git a/src/serverobject.cpp b/src/serverobject.cpp index 95735de1..81307bc3 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();