fix: Crash when changing font size

This commit is contained in:
WerWolv
2022-02-23 10:16:27 +01:00
parent 1487f760b0
commit 73d74f6cde

View File

@@ -260,14 +260,13 @@ namespace hex::plugin::builtin {
static int fontSize = static_cast<int>(setting);
ImGui::BeginDisabled(fontPath.empty());
ON_SCOPE_EXIT { ImGui::EndDisabled(); };
if (ImGui::SliderInt(name.data(), &fontSize, 0, 100, "%d", ImGuiSliderFlags_NoInput)) {
setting = fontSize;
return true;
}
ImGui::EndDisabled();
return false;
},
true);