Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[:)] Make a developer happy
  • Loading branch information
elpaso committed Oct 3, 2017
1 parent d102404 commit afecc21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/providers/wms/qgstilecache.cpp
Expand Up @@ -33,10 +33,11 @@ void QgsTileCache::insertTile( const QUrl &url, const QImage &image )
bool QgsTileCache::tile( const QUrl &url, QImage &image )
{
QMutexLocker locker( &sTileCacheMutex );
bool success = false;
if ( QImage *i = sTileCache.object( url ) )
{
image = *i;
return true;
success = true;
}
else if ( QgsNetworkAccessManager::instance()->cache()->metaData( url ).isValid() )
{
Expand All @@ -52,9 +53,9 @@ bool QgsTileCache::tile( const QUrl &url, QImage &image )
if ( ! image.isNull( ) )
{
sTileCache.insert( url, new QImage( image ) );
return true;
success = true;
}
}
}
return false;
return success;
}

0 comments on commit afecc21

Please sign in to comment.