1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:23:54 +00:00

Correction to teleportation changes.

OMW Bug #2400
Related to OMW Bug #1533

Don't crash on confiscating items if a prison marker cannot be found.
This commit is contained in:
Jordan Ayers 2015-02-24 21:10:01 -06:00
parent 691ebd2372
commit 659a8ba279

View file

@ -3075,6 +3075,11 @@ namespace MWWorld
void World::confiscateStolenItems(const Ptr &ptr)
{
MWWorld::Ptr prisonMarker = getClosestMarker( ptr, "prisonmarker" );
if ( prisonMarker.isEmpty() )
{
std::cerr << "Failed to confiscate items: no closest prison marker found." << std::endl;
return;
}
std::string prisonName = prisonMarker.mRef->mRef.getDestCell();
if ( prisonName.empty() )
{