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 26cd0bc57d
commit 2db690a866
3 changed files with 21 additions and 5 deletions

View file

@ -344,11 +344,15 @@ void Application::update(float deltaTime) {
break;
case AppState::CHARACTER_CREATION:
// Character creation update
if (gameHandler) {
gameHandler->update(deltaTime);
}
break;
case AppState::CHARACTER_SELECTION:
// Character selection update
if (gameHandler) {
gameHandler->update(deltaTime);
}
break;
case AppState::IN_GAME: