Skip to content
Permalink
Browse files

fix failed assertion when sld import fails

  • Loading branch information
brushtyler committed Sep 28, 2012
1 parent 84625ee commit ada8d402b2a59bac1191a0958baf3455a8c6ca6d
Showing with 17 additions and 17 deletions.
  1. +17 −17 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
@@ -304,28 +304,28 @@ QgsFeatureRendererV2* QgsSingleSymbolRendererV2::createFromSld( QDomElement& ele
childElem = childElem.nextSiblingElement();
}

if ( layers.size() == 0 )
return NULL;

// now create the symbol
QgsSymbolV2 *symbol = 0;
if ( layers.size() > 0 )
QgsSymbolV2 *symbol;
switch ( geomType )
{
switch ( geomType )
{
case QGis::Line:
symbol = new QgsLineSymbolV2( layers );
break;
case QGis::Line:
symbol = new QgsLineSymbolV2( layers );
break;

case QGis::Polygon:
symbol = new QgsFillSymbolV2( layers );
break;
case QGis::Polygon:
symbol = new QgsFillSymbolV2( layers );
break;

case QGis::Point:
symbol = new QgsMarkerSymbolV2( layers );
break;
case QGis::Point:
symbol = new QgsMarkerSymbolV2( layers );
break;

default:
QgsDebugMsg( QString( "invalid geometry type: found %1" ).arg( geomType ) );
return NULL;
}
default:
QgsDebugMsg( QString( "invalid geometry type: found %1" ).arg( geomType ) );
return NULL;
}

// and finally return the new renderer

0 comments on commit ada8d40

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