fixed crash when enum in property grid is empty (e.g. ambient sound with no clips)
This commit is contained in:
parent
0d74a20860
commit
f0fa7f302d
1 changed files with 1 additions and 1 deletions
|
@ -203,7 +203,7 @@ struct GridUIVisitor final : Reflection::IPropertyVisitor
|
|||
|
||||
const int count = enum_attr->count(cmp);
|
||||
|
||||
const char* preview = enum_attr->name(cmp, value);
|
||||
const char* preview = count ? enum_attr->name(cmp, value) : "";
|
||||
ImGuiEx::Label(prop.name);
|
||||
ImGui::PushID(prop.name);
|
||||
if (ImGui::BeginCombo("##v", preview)) {
|
||||
|
|
Loading…
Reference in a new issue