mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 12:23:53 +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:
parent
691ebd2372
commit
659a8ba279
1 changed files with 5 additions and 0 deletions
|
@ -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() )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue