Skip to content

Commit 2220a6e

Browse files
authored
Merge pull request #6667 from slarosa/fix_18530
Fixes #18530: Removing project item from Welcome screen crashes QGIS
2 parents 5d34584 + af6ad23 commit 2220a6e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/qgswelcomepageitemsmodel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ QVariant QgsWelcomePageItemsModel::data( const QModelIndex &index, int role ) co
201201

202202
Qt::ItemFlags QgsWelcomePageItemsModel::flags( const QModelIndex &index ) const
203203
{
204+
if ( !index.isValid() || !rowCount( index.parent() ) )
205+
return Qt::NoItemFlags;
206+
204207
Qt::ItemFlags flags = QAbstractListModel::flags( index );
205208

206209
const RecentProjectData &projectData = mRecentProjects.at( index.row() );

0 commit comments

Comments
 (0)