diff --git a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp index bd5fa1b11..cd3cd1f80 100644 --- a/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp +++ b/apps/openmw/mwmechanics/mechanicsmanagerimp.cpp @@ -1118,8 +1118,11 @@ namespace MWMechanics Misc::StringUtils::lowerCaseInPlace(owner.first); if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId)) - mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; - + { + const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true); + if (!victimRef.getClass().getCreatureStats(victimRef).isDead()) + mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; + } if (alarm) commitCrime(ptr, victim, OT_Theft, item.getClass().getValue(item) * count); }