Code refactoring for ObjectList::get_selection_indexes().
Assert is changed to check if selection isn't empty. Elsewhere processing of the empty selection can causes a crash.
This commit is contained in:
parent
baee1671ef
commit
14749d3c73
1 changed files with 2 additions and 1 deletions
|
@ -349,7 +349,8 @@ void ObjectList::get_selection_indexes(std::vector<int>& obj_idxs, std::vector<i
|
|||
{
|
||||
wxDataViewItemArray sels;
|
||||
GetSelections(sels);
|
||||
assert(!sels.IsEmpty());
|
||||
if (sels.IsEmpty())
|
||||
return;
|
||||
|
||||
if ( m_objects_model->GetItemType(sels[0]) & itVolume ||
|
||||
(sels.Count()==1 && m_objects_model->GetItemType(m_objects_model->GetParent(sels[0])) & itVolume) ) {
|
||||
|
|
Loading…
Reference in a new issue