Permalink
Browse files

Fix crash on legend icon with offset generation (#4790)

  • Loading branch information...
1 parent 40b975b commit c217944d3f652edd93c6b4eb5da8f544a72ce450 @tbonfort tbonfort committed Oct 13, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 maplegend.c
View
@@ -119,6 +119,7 @@ int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *theclass,
}
/* initialize the box used for polygons and for outlines */
+ msInitShape(&box);
box.line = (lineObj *)msSmallMalloc(sizeof(lineObj));
box.numlines = 1;
box.line[0].point = (pointObj *)msSmallMalloc(sizeof(pointObj)*5);
@@ -244,6 +245,7 @@ int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *theclass,
else
offset = theclass->styles[0]->width/2;
}
+ msInitShape(&zigzag);
zigzag.line = (lineObj *)msSmallMalloc(sizeof(lineObj));
zigzag.numlines = 1;
zigzag.line[0].point = (pointObj *)msSmallMalloc(sizeof(pointObj)*4);

0 comments on commit c217944

Please sign in to comment.