Skip to content
Permalink
Browse files

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
  • Loading branch information
jef
jef committed Feb 12, 2011
1 parent 721cc0f commit b45f870925bda64877575e86864c74684e71ed12
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/mapserver/qgsprojectparser.cpp
@@ -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 );

0 comments on commit b45f870

Please sign in to comment.
You can’t perform that action at this time.