Permalink
Browse files

Fix bug with empty geometrycollections (#4751)

  • Loading branch information...
tbonfort committed Sep 16, 2013
1 parent 5102de2 commit 475e4200f4e7ff5f0364c15643f95747febe7923
Showing with 3 additions and 1 deletion.
  1. +3 −1 mappostgis.c
@@ -587,7 +587,7 @@ wkbConvCollectionToShape(wkbObj *w, shapeObj *shape)
failures++;
}
}
if ( failures == ncomponents )
if ( failures == ncomponents || ncomponents == 0)
return MS_FAILURE;
else
return MS_SUCCESS;
@@ -2195,6 +2195,8 @@ int msPostGISReadShape(layerObj *layer, shapeObj *shape)
shape->numvalues = layer->numitems;
msComputeBounds(shape);
} else {
shape->type = MS_SHAPE_NULL;
}
if( layer->debug > 2 ) {

0 comments on commit 475e420

Please sign in to comment.