mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
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:
parent
b3bbba8f48
commit
e15a91911e
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue