1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-18 13:12:50 +00:00

Fix crash when exception is thrown in startNewGame()

This commit is contained in:
scrawl 2015-11-27 21:38:57 +01:00
parent 177a6f4a68
commit 5b8fd79b4b
2 changed files with 2 additions and 2 deletions

View File

@ -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++);

View File

@ -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);
}