Fixed a crash when 'Repair by Netfabb' was called with multiple object selection,

the bug was introduced with 1eebaa4 and possibly manifested in other scenarios as well.
This commit is contained in:
Lukas Matena 2021-09-02 14:20:04 +02:00
parent cc480afe9b
commit 0efa0fc512

View file

@ -2561,6 +2561,9 @@ wxDataViewItem ObjectList::add_settings_item(wxDataViewItem parent_item, const D
void ObjectList::update_info_items(size_t obj_idx, wxDataViewItemArray* selections/* = nullptr*/, bool added_object/* = false*/)
{
if (obj_idx >= m_objects->size())
return;
const ModelObject* model_object = (*m_objects)[obj_idx];
wxDataViewItem item_obj = m_objects_model->GetItemById(obj_idx);
assert(item_obj.IsOk());