Skip to content
Permalink
Browse files

Fix crash with "add selected layers" from browser (fix #14223)

  • Loading branch information
nyalldawson committed Feb 4, 2016
1 parent 2566061 commit 0796df00fb912caad16afc700635b385b39a88cd
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/app/qgsbrowserdockwidget.cpp
@@ -577,9 +577,9 @@ void QgsBrowserDockWidget::addSelectedLayers()
qSort( list );

// If any of the layer items are QGIS we just open and exit the loop
for ( int i = 0; i <= list.size(); i++ )
Q_FOREACH ( const QModelIndex& index, list )
{
QgsDataItem *item = mModel->dataItem( mProxyModel->mapToSource( list[i] ) );
QgsDataItem *item = mModel->dataItem( mProxyModel->mapToSource( index ) );
if ( item && item->type() == QgsDataItem::Project )
{
QgsProjectItem *projectItem = qobject_cast<QgsProjectItem*>( item );

0 comments on commit 0796df0

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