fix: Crashes when font failed to be loaded

This commit is contained in:
WerWolv
2025-07-31 23:13:50 +02:00
parent bb6ea5f1e5
commit a2c4aefced
2 changed files with 7 additions and 3 deletions

View File

@@ -24,6 +24,7 @@ namespace hex::fonts::loader {
ImFontConfig config;
config.MergeMode = false;
config.SizePixels = settings.getFontSize();
config.Flags |= ImFontFlags_NoLoadError;
std::memcpy(config.Name, name.get().c_str(), std::min(name.get().size(), sizeof(config.Name) - 1));