[server] Fix crash in WMS server when... bad things happen

No idea what exactly the reason is, and it was only discovered by
countless hours of printf-debugging. So I'm just pushing the fix
for everyone else who might be affected.
This commit is contained in:
Matthias Kuhn 2016-07-12 19:27:31 +02:00
parent ae3db0a1bf
commit e49661d7e0

View File

@ -1146,6 +1146,11 @@ void QgsWMSProjectParser::addLayers( QDomDocument &doc,
}
}
if ( !ltGroup )
{
QgsDebugMsg( QString( "Skipping group %1, it could not be found" ).arg( name ) );
continue;
}
QString shortName = ltGroup->customProperty( "wmsShortName" ).toString();
QString title = ltGroup->customProperty( "wmsTitle" ).toString();