Skip to content

Commit

Permalink
Added status check after msLayerWhichItems() is called in msDrawVecto…
Browse files Browse the repository at this point in the history
…rLayer(). (#5188)
  • Loading branch information
sdlime committed Oct 29, 2015
1 parent 963423b commit a1a589d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mapdraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -925,13 +925,17 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
if(status != MS_SUCCESS) return MS_FAILURE;

/* build item list. STYLEITEM javascript needs the shape attributes */
if (layer->styleitem &&
(strncasecmp(layer->styleitem, "javascript://", 13) == 0)) {
if (layer->styleitem && (strncasecmp(layer->styleitem, "javascript://", 13) == 0)) {
status = msLayerWhichItems(layer, MS_TRUE, NULL);
} else {
status = msLayerWhichItems(layer, MS_FALSE, NULL);
}

if(status != MS_SUCCESS) {
msLayerClose(layer);
return MS_FAILURE;
}

/* identify target shapes */
if(layer->transform == MS_TRUE) {
searchrect = map->extent;
Expand Down

0 comments on commit a1a589d

Please sign in to comment.