Fixed a crash in the properties editor

This crash happened sometimes when clicking on the
node elements (e.g. "Boxes" or "Instances") of the
object tree, the node was the second or further one
and the category clicked at was containing one
item only.
This commit is contained in:
Matthias Koefferlein 2024-09-01 18:10:14 +02:00
parent 793c892b2b
commit be7c4538ba
1 changed files with 2 additions and 2 deletions

View File

@ -343,9 +343,9 @@ PropertiesDialog::current_index_changed (const QModelIndex &index, const QModelI
m_object_indexes.push_back (oi);
}
} else {
} else if (mp_properties_pages [m_index]->count () > 0) {
m_object_indexes.push_back (size_t (mp_tree_model->object_index (index)));
m_object_indexes.push_back (0);
}