Skip to content

Commit 0854e79

Browse files
committedAug 5, 2017
Protect postgis crs cache with mutex
1 parent 8e20076 commit 0854e79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3950,6 +3950,8 @@ QgsCoordinateReferenceSystem QgsPostgresProvider::crs() const
39503950
srs.createFromSrid( srid );
39513951
if ( !srs.isValid() )
39523952
{
3953+
static QMutex sMutex;
3954+
QMutexLocker locker( &sMutex );
39533955
static QMap<int, QgsCoordinateReferenceSystem> sCrsCache;
39543956
if ( sCrsCache.contains( srid ) )
39553957
srs = sCrsCache.value( srid );

0 commit comments

Comments
 (0)
Please sign in to comment.