fixed assert

This commit is contained in:
Mikulas Florek 2023-10-11 18:38:15 +02:00
parent 17ec4e653b
commit 45e373934f
1 changed files with 1 additions and 1 deletions

View File

@ -1672,7 +1672,7 @@ struct StudioAppImpl final : StudioApp
m_editor->setEntityName((EntityRef)m_renaming_entity, m_rename_buf);
m_renaming_entity = INVALID_ENTITY;
}
if (ImGui::IsItemDeactivated()) {
if (ImGui::IsItemDeactivated() && m_renaming_entity.isValid()) {
if (ImGui::IsItemDeactivatedAfterEdit() && m_rename_buf[0]) {
m_editor->setEntityName((EntityRef)m_renaming_entity, m_rename_buf);
}