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:
parent
177a6f4a68
commit
5b8fd79b4b
@ -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 New Issue
Block a user