From e2d30eeba2971f3ba3e0015c45da1721eae85b50 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 17 Feb 2025 13:06:35 +0100 Subject: [PATCH] fix: Crash when setting invalid font --- main/gui/source/window/window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/gui/source/window/window.cpp b/main/gui/source/window/window.cpp index 1d712b17a..1821203ee 100644 --- a/main/gui/source/window/window.cpp +++ b/main/gui/source/window/window.cpp @@ -343,7 +343,7 @@ namespace hex { auto ¤tFont = ImGui::GetIO().Fonts; for (const auto &[name, font] : fontDefinitions) { // If the texture for this atlas has been built already, don't do it again - if (font == nullptr || font->ContainerAtlas->TexID != 0) + if (font == nullptr || font->ContainerAtlas == nullptr || font->ContainerAtlas->TexID != 0) continue; currentFont = font->ContainerAtlas;