Skip to content
Permalink
Browse files

Fix crash when open project containing a mesh with a extras dataset g…

…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 244bb5543a18ddd1ca98a4275c22b40e6a968a7f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/mesh/qgsmeshdatasetgrouptreeview.cpp
@@ -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];

0 comments on commit 244bb55

Please sign in to comment.
You can’t perform that action at this time.