From 398eecc35e38b93b322b939b2d2dd0c10a13d9e7 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 28 Nov 2012 02:51:46 +0100 Subject: [PATCH] GetWeaponType fix --- apps/openmw/mwscript/containerextensions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp index df2568fa4..7f4913b8a 100644 --- a/apps/openmw/mwscript/containerextensions.cpp +++ b/apps/openmw/mwscript/containerextensions.cpp @@ -294,7 +294,7 @@ namespace MWScript MWWorld::InventoryStore& invStore = MWWorld::Class::get(ptr).getInventoryStore (ptr); MWWorld::ContainerStoreIterator it = invStore.getSlot (MWWorld::InventoryStore::Slot_CarriedRight); - if (it == invStore.end()) + if (it == invStore.end() || it->getTypeName () != typeid(ESM::Weapon).name()) { runtime.push(-1); return;