From 32cebd7a11814f17d4a46ac6888eb44a73a9d221 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Tue, 22 Oct 2024 19:49:16 +0200 Subject: [PATCH] [UI] Fixed assertion caused by style push/pop mismatch --- src/xenia/app/emulator_window.cc | 2 ++ src/xenia/app/profile_dialogs.cc | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/xenia/app/emulator_window.cc b/src/xenia/app/emulator_window.cc index 409810f35..dc4c20cac 100644 --- a/src/xenia/app/emulator_window.cc +++ b/src/xenia/app/emulator_window.cc @@ -337,6 +337,8 @@ void EmulatorWindow::DisplayConfigDialog::OnDraw(ImGuiIO& io) { ImGui::End(); return; } + + ImGui::PopStyleVar(); // Even if the close button has been pressed, still paint everything not to // have one frame with an empty window. diff --git a/src/xenia/app/profile_dialogs.cc b/src/xenia/app/profile_dialogs.cc index d52d0bac1..2a211ed4c 100644 --- a/src/xenia/app/profile_dialogs.cc +++ b/src/xenia/app/profile_dialogs.cc @@ -111,6 +111,8 @@ void NoProfileDialog::OnDraw(ImGuiIO& io) { return; } + ImGui::PopStyleVar(); + const std::string message = "There is no profile available! You will not be able to save without " "one.\n\nWould you like to create one?"; @@ -180,6 +182,8 @@ void ProfileConfigDialog::OnDraw(ImGuiIO& io) { return; } + ImGui::PopStyleVar(); + if (profiles->empty()) { ImGui::TextUnformatted("No profiles found!"); ImGui::Spacing();