Skip to content

Commit

Permalink
Fix crash on GRID layer without LABEL block (fixes #5466)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Dec 21, 2017
1 parent fc06d45 commit e82d376
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions mapgraticule.c
Expand Up @@ -285,6 +285,7 @@ int msGraticuleLayerNextShape(layerObj *layer, shapeObj *shape)
shape->type = MS_SHAPE_LINE;
shape->line = (lineObj *) msSmallMalloc(sizeof( lineObj ));
shape->line->numpoints = (int) pInfo->maxsubdivides;
shape->line->point = NULL;

/*
* Subdivide and draw current arc, rendering the arc labels first
Expand Down
Binary file added msautotest/misc/expected/grid_without_label.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions msautotest/misc/grid_without_label.map
@@ -0,0 +1,38 @@
#
# REQUIRES: OUTPUT=PNG SUPPORTS=PROJ
#

MAP
NAME "testMap"

STATUS ON
SIZE 200 100
EXTENT 0 0 2000 1000
UNITS METERS
IMAGETYPE png

PROJECTION
"init=epsg:3857"
END

LAYER
NAME "grid"
PROJECTION
"init=epsg:3857"
END
STATUS ON
TYPE LINE
UNITS METERS
CLASS
STYLE
COLOR "#000000"
OPACITY 100
END
END
GRID
MAXINTERVAL 500
MININTERVAL 500
END
END

END

0 comments on commit e82d376

Please sign in to comment.