Skip to content

Commit

Permalink
don't fail on shapefile with no items (#4424)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Aug 22, 2012
1 parent 8e62696 commit a598fec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions mapshape.c
Expand Up @@ -2179,9 +2179,9 @@ int msTiledSHPNextShape(layerObj *layer, shapeObj *shape)
continue; /* skip NULL shapes */
}
shape->tileindex = tSHP->tileshpfile->lastshape;
shape->values = msDBFGetValueList(tSHP->shpfile->hDBF, i, layer->iteminfo, layer->numitems);
if(!shape->values) return(MS_FAILURE);
shape->numvalues = layer->numitems;
shape->values = msDBFGetValueList(tSHP->shpfile->hDBF, i, layer->iteminfo, layer->numitems);
if(!shape->values) shape->numvalues = 0;

filter_passed = MS_TRUE; /* By default accept ANY shape */
if(layer->numitems > 0 && layer->iteminfo) {
Expand Down Expand Up @@ -2556,9 +2556,8 @@ int msSHPLayerNextShape(layerObj *layer, shapeObj *shape)
}
shape->values = msDBFGetValueList(shpfile->hDBF, i, layer->iteminfo, layer->numitems);
if(!shape->values) {
return MS_FAILURE;
shape->numvalues = 0;
}
shape->numvalues = layer->numitems;

filter_passed = MS_TRUE; /* By default accept ANY shape */
if(layer->numitems > 0 && layer->iteminfo) {
Expand Down

0 comments on commit a598fec

Please sign in to comment.