Skip to content

Commit

Permalink
skip legend rendering for empty class name/title
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Sep 29, 2013
1 parent 53c58d8 commit 6f0606b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion maplegend.c
Expand Up @@ -599,7 +599,7 @@ imageObj *msDrawLegend(mapObj *map, int scale_independent, map_hittest *hittest)

for(j=lp->numclasses-1; j>=0; j--) {
text = lp->class[j]->title?lp->class[j]->title:lp->class[j]->name; /* point to the right legend text, title takes precedence */
if(!text) continue; /* skip it */
if(!text || !*text) continue; /* skip it */

/* skip the class if the classgroup is defined */
if(lp->classgroup && (lp->class[j]->group == NULL || strcasecmp(lp->class[j]->group, lp->classgroup) != 0))
Expand Down

0 comments on commit 6f0606b

Please sign in to comment.