Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/source/Scenes/LoginScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ void NewMoveLogInScene()

CCameraMove::GetInstancePtr()->SetTourMode(FALSE);

// Tear down the login scene data before asking the server for the
// account characters, otherwise a fast reply can be cleared again.
ReleaseLogoSceneData();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While moving ReleaseLogoSceneData() to fix the race condition is correct, completely removing ClearCharacters() might introduce a new bug. If a player logs out from an account and logs into a different one with fewer characters, the characters from the previous account might still be displayed if they are not cleared.

It seems ClearCharacters() is necessary to ensure a clean state for the new account's character list. I'd recommend re-introducing it here, before the SendRequestCharacterList call.

Suggested change
ReleaseLogoSceneData();
ReleaseLogoSceneData();
ClearCharacters();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReleaseLogoSceneData already calls ClearCharacters so no need to call it twice


SceneFlag = CHARACTER_SCENE;
CurrentProtocolState = REQUEST_CHARACTERS_LIST;
SocketClient->ToGameServer()->SendRequestCharacterList(g_pMultiLanguage->GetLanguage());

ReleaseLogoSceneData();

ClearCharacters();
}

g_ConsoleDebug->UpdateMainScene();
Expand Down