mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
mapserver: fix crash when layer cache is to small for project
git-svn-id: http://svn.osgeo.org/qgis/trunk@15161 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
721cc0f23e
commit
b45f870925
@ -194,6 +194,13 @@ void QgsProjectParser::addLayers( QDomDocument &doc,
|
||||
else if ( currentChildElem.tagName() == "legendlayer" )
|
||||
{
|
||||
QString id = layerIdFromLegendLayer( currentChildElem );
|
||||
|
||||
if ( !layerMap.contains( id ) )
|
||||
{
|
||||
QgsMSDebugMsg( QString( "layer %1 not found in map - layer cache to small?" ).arg( id ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
QgsMapLayer *currentLayer = layerMap[ id ];
|
||||
if ( !currentLayer )
|
||||
{
|
||||
@ -257,8 +264,7 @@ void QgsProjectParser::addLayers( QDomDocument &doc,
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
#if QGSMSDEBUG
|
||||
#if 0
|
||||
QString buf;
|
||||
QTextStream s( &buf );
|
||||
layerElem.save( s, 0 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user