Skip to content

Commit

Permalink
Move QgsOgrConnPool::instance()->unref() from QgsOgrProvider::close()…
Browse files Browse the repository at this point in the history
… to destructor, since we can open()/close() several times
  • Loading branch information
rouault committed May 29, 2016
1 parent 7d70f32 commit fe32ba4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -384,6 +384,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
QgsOgrProvider::~QgsOgrProvider()
{
close();
QgsOgrConnPool::instance()->unref( mFilePath );
}

QgsAbstractFeatureSource* QgsOgrProvider::featureSource() const
Expand Down Expand Up @@ -2969,8 +2970,6 @@ void QgsOgrProvider::close()
setProperty( "_debug_open_mode", "invalid" );

updateExtents();

QgsOgrConnPool::instance()->unref( mFilePath );
}

void QgsOgrProvider::reloadData()
Expand Down

0 comments on commit fe32ba4

Please sign in to comment.