Skip to content

Commit

Permalink
Fix crash on legends with sizeunits (#4785)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Oct 15, 2013
1 parent 7399024 commit 33996f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maplegend.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ imageObj *msDrawLegend(mapObj *map, int scale_independent, map_hittest *hittest)
/* set the scale factor so that scale dependant symbols are drawn in the legend with their default size */
if(lp->sizeunits != MS_PIXELS) {
map->cellsize = msAdjustExtent(&(map->extent), map->width, map->height);
lp->scalefactor = (msInchesPerUnit(map->layers[cur->layerindex]->sizeunits,0)/msInchesPerUnit(map->units,0)) / map->cellsize;
lp->scalefactor = (msInchesPerUnit(lp->sizeunits,0)/msInchesPerUnit(map->units,0)) / map->cellsize;
}

for(j=lp->numclasses-1; j>=0; j--) {
Expand Down

0 comments on commit 33996f1

Please sign in to comment.