well, not quite

This commit is contained in:
DarthArgus
2016-11-20 07:32:49 -06:00
parent 74ebc3ec43
commit b2a5fc55ab
2 changed files with 2 additions and 2 deletions
@@ -603,6 +603,7 @@ void Persister::saveCompleted(Snapshot *completedSnapshot)
if (i!=m_savingSnapshots.end())
{
m_savingSnapshots.erase(i, m_savingSnapshots.end());
delete (*i);
if (m_savingSnapshots.empty() && ConfigServerDatabase::getReportSaveTimes())
{
@@ -636,6 +637,7 @@ 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);
DEBUG_REPORT_LOG(ConfigServerDatabase::getReportSaveTimes(),("New character save completed\n"));
}
}
@@ -32,8 +32,6 @@ void TaskSaveSnapshot::onComplete()
{
m_snapshot->saveCompleted();
Persister::getInstance().saveCompleted(m_snapshot);
delete m_snapshot;
m_snapshot = nullptr; // just in case some brilliant SOE BS uses it again somewhere before this class object is nuked
}
// ======================================================================