Skip to content

Commit

Permalink
Fix crash when open project containing a mesh with a extras dataset g…
Browse files Browse the repository at this point in the history
…roups with incompatible mesh

QGis application crash when opening a project contain a mesh layer with a dataset groups wich has a incompatible mesh. It can  happen when the dataset groups file change after first loading.
  • Loading branch information
vcloarec authored and PeterPetrik committed May 3, 2019
1 parent 9820bb4 commit 244bb55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/mesh/qgsmeshdatasetgrouptreeview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ void QgsMeshDatasetGroupTreeModel::addTreeItem( const QString &groupName, bool i

QModelIndex QgsMeshDatasetGroupTreeModel::groupIndexToModelIndex( int groupIndex )
{
if ( groupIndex < 0 )
if ( groupIndex < 0 || !mDatasetGroupIndexToItem.contains( groupIndex ) )
return QModelIndex();

const auto item = mDatasetGroupIndexToItem[groupIndex];
Expand Down

0 comments on commit 244bb55

Please sign in to comment.