Navigation Menu

Skip to content

Commit

Permalink
[server] Fix potential crash caused by referencing out of scope local
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 26, 2017
1 parent 68437a1 commit 721131e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -42,12 +42,12 @@ namespace QgsWms
cache = accessControl->fillCacheKey( cacheKeyList );
#endif

QDomDocument doc;
QString cacheKey = cacheKeyList.join( QStringLiteral( "-" ) );
const QDomDocument *capabilitiesDocument = capabilitiesCache->searchCapabilitiesDocument( configFilePath, cacheKey );
if ( !capabilitiesDocument ) //capabilities xml not in cache. Create a new one
{
QgsMessageLog::logMessage( QStringLiteral( "Capabilities document not found in cache" ) );
QDomDocument doc;

doc = getCapabilities( serverIface, project, version, request, projectSettings );

Expand Down

0 comments on commit 721131e

Please sign in to comment.