Skip to content

Commit

Permalink
Fix bug with empty geometrycollections (#4751)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Oct 4, 2013
1 parent 5102de2 commit 475e420
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mappostgis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ) {
Expand Down

0 comments on commit 475e420

Please sign in to comment.