mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Fix crash when open project containing a mesh with a extras dataset groups 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.
This commit is contained in:
parent
9820bb4fa9
commit
244bb5543a
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user