forked from teamnwah/openmw-tes3coop
Fix crash when exception is thrown in startNewGame()
This commit is contained in:
parent
177a6f4a68
commit
5b8fd79b4b
2 changed files with 2 additions and 2 deletions
|
@ -926,7 +926,7 @@ namespace MWMechanics
|
|||
PtrActorMap::iterator iter = mActors.begin();
|
||||
while(iter != mActors.end())
|
||||
{
|
||||
if(iter->first.getCell()==cellStore && iter->first != ignore)
|
||||
if((iter->first.isInCell() && iter->first.getCell()==cellStore) && iter->first != ignore)
|
||||
{
|
||||
delete iter->second;
|
||||
mActors.erase(iter++);
|
||||
|
|
|
@ -185,7 +185,7 @@ void RippleSimulation::removeCell(const MWWorld::CellStore *store)
|
|||
{
|
||||
for (std::vector<Emitter>::iterator it = mEmitters.begin(); it != mEmitters.end();)
|
||||
{
|
||||
if (it->mPtr.getCell() == store && it->mPtr != MWMechanics::getPlayer())
|
||||
if ((it->mPtr.isInCell() && it->mPtr.getCell() == store) && it->mPtr != MWMechanics::getPlayer())
|
||||
{
|
||||
it = mEmitters.erase(it);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue