From cf6bca435e1b3dcf63d9e3c8c2fce132c8f0517b Mon Sep 17 00:00:00 2001 From: Guillaume Meunier Date: Sun, 14 Jul 2024 14:07:10 +0200 Subject: [PATCH] Fix possible memory leak --- client/render/imgui_impl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index b8b203bd..64571562 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -509,7 +509,7 @@ void imgui_context::initialize_fonts() { ImFontConfig config; - config.FontDataOwnedByAtlas = false; + config.FontDataOwnedByAtlas = true; for (auto & font: fonts) { @@ -527,7 +527,7 @@ void imgui_context::initialize_fonts() { ImFontConfig config; - config.FontDataOwnedByAtlas = false; + config.FontDataOwnedByAtlas = true; for (auto & font: fonts) { large_font = io.Fonts->AddFontFromFileTTF(font.c_str(), 75, &config, glyph_ranges.Data);