Skip to content

Commit ebe0a84

Browse files
committed
Try and fix RFG-C-29284
1 parent 75de5d9 commit ebe0a84

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Scripts/Game/EPF_PersistenceManager.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,12 @@ class EPF_PersistenceManager
310310
if (!m_bAutoSaveActive)
311311
return;
312312

313-
MapIterator mapEnd = m_mRootAutoSave.End();
314-
while (m_iAutoSaveEntityIt != mapEnd)
313+
while (m_iAutoSaveEntityIt < m_mRootAutoSave.End())
315314
{
316315
EPF_PersistenceComponent persistenceComponent = m_mRootAutoSave.GetIteratorElement(m_iAutoSaveEntityIt);
317316
if (!persistenceComponent)
318317
{
319318
m_mRootAutoSave.RemoveElement(m_iAutoSaveEntityIt);
320-
mapEnd = m_mRootAutoSave.End();
321-
m_iAutoSaveEntityIt = m_mRootAutoSave.Next(m_iAutoSaveEntityIt);
322319
continue;
323320
}
324321

@@ -337,7 +334,7 @@ class EPF_PersistenceManager
337334
}
338335
}
339336

340-
while (m_iAutoSaveScriptedStateIt != m_mScriptedStateAutoSave.End())
337+
while (m_iAutoSaveScriptedStateIt < m_mScriptedStateAutoSave.End())
341338
{
342339
EPF_PersistentScriptedState scriptedState = m_mScriptedStateAutoSave.GetIteratorElement(m_iAutoSaveScriptedStateIt);
343340
m_iAutoSaveScriptedStateIt = m_mScriptedStateAutoSave.Next(m_iAutoSaveScriptedStateIt);

0 commit comments

Comments
 (0)