Skip to content

Commit

Permalink
Theme::replace could enter an infinite loop since commit c68749b (5 d…
Browse files Browse the repository at this point in the history
…ays ago)
  • Loading branch information
texus committed Jul 17, 2024
1 parent 566e011 commit 5abd2a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TGUI 1.4.1 (TBD)
-----------------

- Fixed infinite loop in Theme::replace (introduced in TGUI 1.4.0)
- PanelListBox now has proper background color and borders in White theme


Expand Down
5 changes: 4 additions & 1 deletion src/Loading/Theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,10 @@ namespace tgui
for (auto pair : m_renderers)
{
const auto& renderer = pair.second;
for (auto& observer : renderer->observers)

// Make a copy of the observers because setRenderer alters the observers
auto observers = renderer->observers;
for (auto* observer : observers)
observer->setRenderer(renderer);
}

Expand Down

0 comments on commit 5abd2a7

Please sign in to comment.