[UI] Fixed assertion caused by style push/pop mismatch

This commit is contained in:
Gliniak 2024-10-22 19:49:16 +02:00
parent 77b6ad1de7
commit 32cebd7a11
2 changed files with 6 additions and 0 deletions

View File

@ -337,6 +337,8 @@ void EmulatorWindow::DisplayConfigDialog::OnDraw(ImGuiIO& io) {
ImGui::End(); ImGui::End();
return; return;
} }
ImGui::PopStyleVar();
// Even if the close button has been pressed, still paint everything not to // Even if the close button has been pressed, still paint everything not to
// have one frame with an empty window. // have one frame with an empty window.

View File

@ -111,6 +111,8 @@ void NoProfileDialog::OnDraw(ImGuiIO& io) {
return; return;
} }
ImGui::PopStyleVar();
const std::string message = const std::string message =
"There is no profile available! You will not be able to save without " "There is no profile available! You will not be able to save without "
"one.\n\nWould you like to create one?"; "one.\n\nWould you like to create one?";
@ -180,6 +182,8 @@ void ProfileConfigDialog::OnDraw(ImGuiIO& io) {
return; return;
} }
ImGui::PopStyleVar();
if (profiles->empty()) { if (profiles->empty()) {
ImGui::TextUnformatted("No profiles found!"); ImGui::TextUnformatted("No profiles found!");
ImGui::Spacing(); ImGui::Spacing();