Fix storing load/save result in main thread without incrementing usage count

Resulting to race condition, since the main thread always thought that the
load/save thread already completed. Passing the shared_ptr by reference to
prevent a similar future bug to happen.

Fixes #3380
This commit is contained in:
Zwelf 2020-12-04 10:53:28 +01:00
parent b3bbba8f48
commit e15a91911e

View file

@ -123,9 +123,9 @@ public:
m_TeeFinished[ClientID] = finished;
}
void SetSaving(int TeamID, std::shared_ptr<CScoreSaveResult> SaveResult)
void SetSaving(int TeamID, std::shared_ptr<CScoreSaveResult> &SaveResult)
{
m_pSaveTeamResult[TeamID] = std::move(SaveResult);
m_pSaveTeamResult[TeamID] = SaveResult;
}
bool GetSaving(int TeamID)