Permalink
Browse files

fix segfault on label with failed scale check (#4781)

  • Loading branch information...
tbonfort committed Oct 4, 2013
1 parent af5ba83 commit 8250fdf93269d132e39b094529f07477e07b2d16
Showing with 4 additions and 5 deletions.
  1. +4 −5 mapdraw.c
@@ -1593,16 +1593,15 @@ int lineLayerDrawShape(mapObj *map, imageObj *image, layerObj *layer, shapeObj *
labelObj *label = layer->class[c]->labels[l];
textSymbolObj ts;
char *annotext;
if(!msGetLabelStatus(map,layer,shape,label)) {
continue;
}
annotext = msShapeGetLabelAnnotation(layer,anno_shape,label);
if(!annotext) continue;
initTextSymbol(&ts);
msPopulateTextSymbolForLabelAndString(&ts,label,annotext,layer->scalefactor,image->resolutionfactor, layer->labelcache);
if(!msGetLabelStatus(map,layer,shape,label)) {
freeTextSymbol(&ts);
free(annotext);
continue;
}
if (label->anglemode == MS_ANGLEMODE_FOLLOW) { /* bug #1620 implementation */
struct label_follow_result lfr;

0 comments on commit 8250fdf

Please sign in to comment.