fix: Assert when plugins failed to load

This commit is contained in:
WerWolv
2025-07-27 15:11:01 +02:00
parent 72501edc9a
commit ec424ac16e

View File

@@ -1051,6 +1051,13 @@ namespace hex {
size *= std::floor(System::getGlobalScale());
}
// If no font has been loaded, revert back to the default font to
// prevent an assertion failure in ImGui
const auto *ctx = ImGui::GetCurrentContext();
if (font == nullptr && ctx->Font == nullptr) [[unlikely]] {
font = ImGui::GetDefaultFont();
}
ImGui::PushFont(font, size);
}