1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Textures: fixed an issue preventing multi-contexts sharing a ImFontAtlas from being possible to destroy in any order.

This commit is contained in:
ocornut 2025-10-01 14:58:30 +02:00
parent a3d6e82dbd
commit b987970870
3 changed files with 4 additions and 2 deletions

View file

@ -4326,7 +4326,7 @@ void ImGui::Shutdown()
for (ImFontAtlas* atlas : g.FontAtlases)
{
UnregisterFontAtlas(atlas);
if (atlas->OwnerContext == &g)
if (atlas->RefCount == 0)
{
atlas->Locked = false;
IM_DELETE(atlas);