Skip to content

Commit

Permalink
erreula: Avoid triggering debug assert in imgui
Browse files Browse the repository at this point in the history
It does not like empty window titles
  • Loading branch information
Exzap committed Apr 10, 2024
1 parent 12eda10 commit d45c2fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Cafe/OS/libs/erreula/erreula.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d45c2fa

Please sign in to comment.