Skip to content

Commit af6ad23

Browse files
committed
Fixes #18530: Removing project item from Welcome screen crashes QGIS
1 parent 5d34584 commit af6ad23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/qgswelcomepageitemsmodel.cpp

+3
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)