From cceff1dc1acf2750c42ca666a58fb39469d7da93 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 20 Nov 2016 07:34:15 -0600 Subject: [PATCH] oops, don't want to invalidate... and yes the completedSnapshot should in theory point to the same snapshot, but for whatever reason deleting it crashes the TC but not my local setup --- engine/server/library/serverDatabase/src/shared/Persister.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/server/library/serverDatabase/src/shared/Persister.cpp b/engine/server/library/serverDatabase/src/shared/Persister.cpp index 00504d0c..a7d92062 100755 --- a/engine/server/library/serverDatabase/src/shared/Persister.cpp +++ b/engine/server/library/serverDatabase/src/shared/Persister.cpp @@ -602,8 +602,8 @@ void Persister::saveCompleted(Snapshot *completedSnapshot) SnapshotListType::iterator i=std::remove(m_savingSnapshots.begin(),m_savingSnapshots.end(),completedSnapshot); if (i!=m_savingSnapshots.end()) { - m_savingSnapshots.erase(i, m_savingSnapshots.end()); delete (*i); + m_savingSnapshots.erase(i, m_savingSnapshots.end()); if (m_savingSnapshots.empty() && ConfigServerDatabase::getReportSaveTimes()) { @@ -636,8 +636,8 @@ void Persister::saveCompleted(Snapshot *completedSnapshot) { SnapshotListType::iterator j=std::remove(m_savingCharacterSnapshots.begin(),m_savingCharacterSnapshots.end(),completedSnapshot); DEBUG_FATAL(i==m_savingCharacterSnapshots.end(),("Programmer bug: SaveCompleted() called with a snapshot that wasn't in m_savingSnapshots or m_savingCharacterSnapshots.")); - m_savingCharacterSnapshots.erase(j, m_savingCharacterSnapshots.end()); delete (*j); + m_savingCharacterSnapshots.erase(j, m_savingCharacterSnapshots.end()); DEBUG_REPORT_LOG(ConfigServerDatabase::getReportSaveTimes(),("New character save completed\n")); } }