Skip to content

Commit fe32ba4

Browse files
committed
Move QgsOgrConnPool::instance()->unref() from QgsOgrProvider::close() to destructor, since we can open()/close() several times
1 parent 7d70f32 commit fe32ba4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/providers/ogr/qgsogrprovider.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )
384384
QgsOgrProvider::~QgsOgrProvider()
385385
{
386386
close();
387+
QgsOgrConnPool::instance()->unref( mFilePath );
387388
}
388389

389390
QgsAbstractFeatureSource* QgsOgrProvider::featureSource() const
@@ -2969,8 +2970,6 @@ void QgsOgrProvider::close()
29692970
setProperty( "_debug_open_mode", "invalid" );
29702971

29712972
updateExtents();
2972-
2973-
QgsOgrConnPool::instance()->unref( mFilePath );
29742973
}
29752974

29762975
void QgsOgrProvider::reloadData()

0 commit comments

Comments
 (0)