Skip to content

Commit

Permalink
Don't draw rmlui if contexts do not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
lhog committed Sep 27, 2024
1 parent c090df7 commit b9462a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rts/Rml/Backends/RmlUi_Backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ void RmlGui::RenderFrame()
}

#ifndef HEADLESS
if (state->contexts.empty())
return;

RmlGui::BeginFrame();
// render back-to-front so that index 0 is atop index 1 and so on
for (auto& context: std::ranges::reverse_view(state->contexts)) {
Expand Down

0 comments on commit b9462a0

Please sign in to comment.