From b6387c3f645b080c30fedee1286981d699a4dc7f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 18 May 2025 11:10:43 +0200 Subject: [PATCH] fix: Crash when loading subpixel font didn't work --- plugins/fonts/source/font_loader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/fonts/source/font_loader.cpp b/plugins/fonts/source/font_loader.cpp index b442281e1..4e6ca8415 100644 --- a/plugins/fonts/source/font_loader.cpp +++ b/plugins/fonts/source/font_loader.cpp @@ -102,7 +102,8 @@ namespace hex::fonts { FT_Done_Face(face); } fontAtlas->getAtlas()->FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_SubPixel; - fontAtlas->build(); + if (!fontAtlas->build()) + return false; ImU8 *tex_pixels_ch = nullptr; ImS32 tex_width; @@ -133,6 +134,7 @@ namespace hex::fonts { ft = nullptr; } } + return true; }