Skip to content
Permalink
Browse files
Fix possible corruption of cache
  • Loading branch information
nyalldawson committed Apr 17, 2017
1 parent 3ada8a2 commit ca2b199c76c5e0ac9a2b33dfadbb0f7da1dcf064
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/core/qgsdistancearea.cpp
@@ -98,17 +98,14 @@ bool QgsDistanceArea::setEllipsoid( const QString &ellipsoid )
if ( cacheIt != sEllipsoidCache.constEnd() )
{
// found a match in the cache
sEllipsoidCacheLock.unlock();
if ( cacheIt.value().valid )
bool result = cacheIt.value().valid;
if ( result )
{
mEllipsoid = ellipsoid;
setFromParams( cacheIt.value() );
return true;
}
else
{
return false;
}
sEllipsoidCacheLock.unlock();
return result;
}
sEllipsoidCacheLock.unlock();

0 comments on commit ca2b199

Please sign in to comment.