From 32b3151132cff98eeb6e1629db26bde9aa4c464f Mon Sep 17 00:00:00 2001 From: Gliniak Date: Sat, 5 Oct 2024 14:27:43 +0200 Subject: [PATCH] [Profile] UI: Skip current draw in case of failure. This should resolve random crash while removing profile --- src/xenia/app/profile_dialogs.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xenia/app/profile_dialogs.cc b/src/xenia/app/profile_dialogs.cc index 2b0bbf717..9817db26b 100644 --- a/src/xenia/app/profile_dialogs.cc +++ b/src/xenia/app/profile_dialogs.cc @@ -183,7 +183,11 @@ void ProfileConfigDialog::OnDraw(ImGuiIO& io) { const uint8_t user_index = profile_manager->GetUserIndexAssignedToProfile(xuid); - DrawProfileContent(xuid, user_index, &account); + if (!DrawProfileContent(xuid, user_index, &account)) { + ImGui::PopID(); + ImGui::End(); + return; + } ImGui::PopID(); ImGui::Spacing();