Skip to content
Permalink
Browse files
Fix bug with empty geometrycollections (#4751)
  • Loading branch information
tbonfort committed Oct 4, 2013
1 parent 5102de2 commit 475e4200f4e7ff5f0364c15643f95747febe7923
Showing 1 changed file with 3 additions and 1 deletion.
@@ -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.