Permalink
Browse files

Fix segfault when setting a utfitem not present (#4904)

  • Loading branch information...
rouault committed Apr 4, 2014
1 parent 3d33922 commit eef2a3d164d25d59fd5dc907b5297faa1667abc3
Showing with 2 additions and 0 deletions.
  1. +2 −0 maplayer.c
View
@@ -686,6 +686,7 @@ int msLayerWhichItems(layerObj *layer, int get_all, const char *metadata)
layer->filteritemindex = -1;
layer->styleitemindex = -1;
layer->labelitemindex = -1;
layer->utfitemindex = -1;
if(layer->classitem) nt++;
if(layer->filteritem) nt++;
@@ -703,6 +704,7 @@ int msLayerWhichItems(layerObj *layer, int get_all, const char *metadata)
nt += msCountChars(layer->cluster.filter.string, '[');
if(layer->labelitem) nt++;
if(layer->utfitem) nt++;
if(layer->_geomtransform.type == MS_GEOMTRANSFORM_EXPRESSION)
msTokenizeExpression(&layer->_geomtransform, layer->items, &(layer->numitems));

0 comments on commit eef2a3d

Please sign in to comment.