fix: Crash when making pattern editor window too small
This commit is contained in:
parent
ef25542220
commit
411884966b
@ -164,7 +164,7 @@ namespace hex::plugin::builtin {
|
||||
textEditorSize.y += height;
|
||||
|
||||
if (availableSize.y > 1)
|
||||
textEditorSize.y = std::clamp(textEditorSize.y, 1.0F, availableSize.y - ImGui::GetTextLineHeightWithSpacing() * 3);
|
||||
textEditorSize.y = std::clamp(textEditorSize.y, 1.0F, std::max(1.0F, availableSize.y - ImGui::GetTextLineHeightWithSpacing() * 3));
|
||||
|
||||
this->m_textEditor.Render("hex.builtin.view.pattern_editor.name"_lang, textEditorSize, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user