Fix: Change filament for a specific object instance (#11963)
Some checks are pending
Build all / Build Linux (push) Waiting to run
Build all / Build Non-Linux (push) Waiting to run
Build all / Unit Tests (push) Blocked by required conditions
Build all / Flatpak (push) Waiting to run

Fix: Crash when setting filament for object instance
This commit is contained in:
tome9111991 2026-01-16 20:09:47 +01:00 committed by GitHub
parent cf54ad58ed
commit d69620a716
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6127,7 +6127,8 @@ void ObjectList::set_extruder_for_selected_items(const int extruder)
* So, if Instance is selected, get its Object item and change it
*/
ItemType sel_item_type = m_objects_model->GetItemType(sel_item);
wxDataViewItem item = (sel_item_type & itInstance) ? m_objects_model->GetObject(item) : sel_item;
// ORCA: Fix crash when setting filament for instance (item was used uninitialized)
wxDataViewItem item = (sel_item_type & itInstance) ? m_objects_model->GetObject(sel_item) : sel_item;
ItemType type = m_objects_model->GetItemType(item);
if (type & itVolume) {
const int obj_idx = m_objects_model->GetObjectIdByItem(item);