Skip to content
Permalink
Browse files

Protect postgis crs cache with mutex

  • Loading branch information
m-kuhn committed Aug 2, 2017
1 parent 8e20076 commit 0854e795d97fc2be19939c3a79c005aea262458b
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/providers/postgres/qgspostgresprovider.cpp
@@ -3950,6 +3950,8 @@ QgsCoordinateReferenceSystem QgsPostgresProvider::crs() const
srs.createFromSrid( srid );
if ( !srs.isValid() )
{
static QMutex sMutex;
QMutexLocker locker( &sMutex );
static QMap<int, QgsCoordinateReferenceSystem> sCrsCache;
if ( sCrsCache.contains( srid ) )
srs = sCrsCache.value( srid );

0 comments on commit 0854e79

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