mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 11:26:37 +00:00 
			
		
		
		
	Account for empty victimRef (Bug #4328)
This commit is contained in:
		
							parent
							
								
									929fc68160
								
							
						
					
					
						commit
						cc0c6ddaa6
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -1120,7 +1120,7 @@ namespace MWMechanics | ||||||
|         if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId)) |         if (!Misc::StringUtils::ciEqual(item.getCellRef().getRefId(), MWWorld::ContainerStore::sGoldId)) | ||||||
|         { |         { | ||||||
|             const MWWorld::Ptr victimRef = MWBase::Environment::get().getWorld()->searchPtr(item.getCellRef().getOwner(), true); |             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; |                 mStolenItems[Misc::StringUtils::lowerCase(item.getCellRef().getRefId())][owner] += count; | ||||||
|         } |         } | ||||||
|         if (alarm) |         if (alarm) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue