From d45c2fa6d1ccd008a2ef22d814530894abd691d1 Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Wed, 10 Apr 2024 20:23:15 +0200 Subject: [PATCH] erreula: Avoid triggering debug assert in imgui It does not like empty window titles --- src/Cafe/OS/libs/erreula/erreula.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Cafe/OS/libs/erreula/erreula.cpp b/src/Cafe/OS/libs/erreula/erreula.cpp index c95816b6..a7f2f35c 100644 --- a/src/Cafe/OS/libs/erreula/erreula.cpp +++ b/src/Cafe/OS/libs/erreula/erreula.cpp @@ -277,10 +277,11 @@ namespace erreula ImGui::SetNextWindowBgAlpha(0.9f); ImGui::PushFont(font); - std::string title = "ErrEula"; + std::string title; if (appearArg.title) title = boost::nowide::narrow(GetText(appearArg.title.GetPtr())); - + if(title.empty()) // ImGui doesn't allow empty titles, so set one if appearArg.title is not set or empty + title = "ErrEula"; if (ImGui::Begin(title.c_str(), nullptr, kPopupFlags)) { const float startx = ImGui::GetWindowSize().x / 2.0f;