fix: Crash when setting invalid font

This commit is contained in:
WerWolv
2025-02-17 13:06:35 +01:00
parent 1da82d1403
commit e2d30eeba2

View File

@@ -343,7 +343,7 @@ namespace hex {
auto &currentFont = 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;