Fix crash in character creation by deferring callback to next update

The charCreateCallback was firing synchronously during ImGui render,
causing a state transition before the create screen's ImGui::End() was
called. Defer the callback to GameHandler::update() and ensure update()
runs during CHARACTER_CREATION and CHARACTER_SELECTION states.
This commit is contained in:
Kelsi 2026-02-05 14:18:41 -08:00
parent 0451c82661
commit 776a617f61
3 changed files with 21 additions and 5 deletions

View file

@ -525,6 +525,9 @@ private:
WorldConnectSuccessCallback onSuccess;
WorldConnectFailureCallback onFailure;
CharCreateCallback charCreateCallback_;
bool pendingCharCreateResult_ = false;
bool pendingCharCreateSuccess_ = false;
std::string pendingCharCreateMsg_;
// ---- XP tracking ----
uint32_t playerXp_ = 0;