Skip to content

Commit

Permalink
Merge pull request ddnet#8964 from furo321/fix-dragger-crash
Browse files Browse the repository at this point in the history
Fix crash while attached to dragger during `hot_reload`
  • Loading branch information
def- authored Sep 16, 2024
2 parents 0a3a095 + ad0fc88 commit 67eb609
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/game/server/save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,12 +529,12 @@ ESaveResult CSaveTeam::Save(CGameContext *pGameServer, int Team, bool Dry, bool
CCharacter *p = (CCharacter *)pGameServer->m_World.FindFirst(CGameWorld::ENTTYPE_CHARACTER);
for(; p; p = (CCharacter *)p->TypeNext())
{
if(pTeams->m_Core.Team(p->GetPlayer()->GetCid()) != Team)
if(pTeams->m_Core.Team(p->GetPlayer()->GetCid()) != Team && !Force)
continue;
if(m_MembersCount == j)
if(m_MembersCount == j && !Force)
return ESaveResult::CHAR_NOT_FOUND;
ESaveResult Result = pGameServer->m_World.BlocksSave(p->GetPlayer()->GetCid());
if(Result != ESaveResult::SUCCESS)
if(Result != ESaveResult::SUCCESS && !Force)
return Result;
m_pSavedTees[j].Save(p);
aPlayerCids[j] = p->GetPlayer()->GetCid();
Expand Down

0 comments on commit 67eb609

Please sign in to comment.