Skip to content
Permalink
Browse files

Avoid some unnecessary work when destructing QgsCoordinateReferenceSy…

…stemPrivate
  • Loading branch information
nyalldawson committed Dec 29, 2020
1 parent 9a8a8c9 commit 97b7ab90f75eb4c24c92061cbaeeaedb33c32d0d
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/core/qgscoordinatereferencesystem_p.h
@@ -95,8 +95,12 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
~QgsCoordinateReferenceSystemPrivate()
{
#if PROJ_VERSION_MAJOR>=6
QgsReadWriteLocker locker( mProjLock, QgsReadWriteLocker::Write );
cleanPjObjects();
QgsReadWriteLocker locker( mProjLock, QgsReadWriteLocker::Read );
if ( !mProjObjects.empty() || mPj )
{
locker.changeMode( QgsReadWriteLocker::Write );
cleanPjObjects();
}
#else
OSRDestroySpatialReference( mCRS );
#endif

0 comments on commit 97b7ab9

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