Skip to content

Commit

Permalink
Data items: Close GDAL dataset when it is not needed
Browse files Browse the repository at this point in the history
This was leading to situations where QGIS was hitting limit of the maximum open files
  • Loading branch information
wonder-sk committed Jun 26, 2015
1 parent b80a1bc commit 7532000
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/gdal/qgsgdaldataitems.cpp
Expand Up @@ -43,7 +43,10 @@ QgsGdalLayerItem::QgsGdalLayerItem( QgsDataItem* parent,
GDALDatasetH hDS = GDALOpen( TO8F( mPath ), GA_Update );

if ( hDS )
{
mCapabilities |= SetCrs;
GDALClose( hDS );
}
}

QgsGdalLayerItem::~QgsGdalLayerItem()
Expand Down

0 comments on commit 7532000

Please sign in to comment.