mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Account for empty victimRef (Bug #4328)
This commit is contained in:
parent
929fc68160
commit
cc0c6ddaa6
@ -1120,7 +1120,7 @@ namespace MWMechanics
|
||||
if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId))
|
||||
{
|
||||
const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true);
|
||||
if (!victimRef.getClass().getCreatureStats(victimRef).isDead())
|
||||
if (victimRef.isEmpty() || !victimRef.getClass().getCreatureStats(victimRef).isDead())
|
||||
mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count;
|
||||
}
|
||||
if (alarm)
|
||||
|
Loading…
x
Reference in New Issue
Block a user