Merge pull request #8831 from furo321/fix-crash-hotreload

Fix `double free or corruption` crash with `hot_reload`
This commit is contained in:
Dennis Felsing 2024-08-27 21:16:58 +00:00 committed by GitHub
commit 3d6820ab68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,7 +120,7 @@ bool CCharacter::Spawn(CPlayer *pPlayer, vec2 Pos)
if(GameServer()->m_apSavedTees[m_pPlayer->GetCid()])
{
GameServer()->m_apSavedTees[m_pPlayer->GetCid()]->Load(m_pPlayer->GetCharacter(), Team);
delete GameServer()->m_apSavedTees[Team];
delete GameServer()->m_apSavedTees[m_pPlayer->GetCid()];
GameServer()->m_apSavedTees[m_pPlayer->GetCid()] = nullptr;
}
}