From 7b7df528717f2f6735efd850088dbb3cdec66d1d Mon Sep 17 00:00:00 2001 From: korenkonder Date: Sun, 8 Oct 2023 13:47:32 +0300 Subject: [PATCH] Sometimes I hate msvc --- src/ReDIVA/classes/glitter_editor.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/ReDIVA/classes/glitter_editor.cpp b/src/ReDIVA/classes/glitter_editor.cpp index b3f67f0d..fc094dd8 100644 --- a/src/ReDIVA/classes/glitter_editor.cpp +++ b/src/ReDIVA/classes/glitter_editor.cpp @@ -4210,23 +4210,22 @@ static void glitter_editor_property_particle(GlitterEditor* glt_edt, class_data* obj* obj = 0; if (handler && handler->obj_set) { obj_set* set = handler->obj_set; - if (set->obj_data) { - ::obj** obj_data = set->obj_data; - for (uint32_t i = 0; i < set->obj_num; i++) - if (obj_data[i]->id == obj_id) { - obj = obj_data[i]; - break; - } - } + ::obj** obj_data = set->obj_data; + for (uint32_t i = 0; i < set->obj_num; i++) + if (obj_data[i]->id == obj_id) { + obj = obj_data[i]; + break; + } } ImGui::StartPropertyColumn("Object"); if (ImGui::BeginCombo("##Object", obj ? obj->name : "None", 0)) { - if (set_id != -1 && handler && handler->set_id == set_id && handler->obj_set && handler->obj_set->obj_data) { + if (set_id != -1 && handler && handler->set_id == set_id && handler->obj_set) { obj_set* set = handler->obj_set; ::obj** obj_data = set->obj_data; ssize_t obj_index = -1; for (uint32_t i = 0; i < set->obj_num; i++) +#pragma warning(suppress: 28182) if (obj_data[i]->id == obj_id) { obj_index = i; break;