Fixed a segfault from occuring if to_wkb was called with a null geometry

This commit is contained in:
Blake Thompson 2015-03-20 17:03:49 -05:00
parent be9d2ad53c
commit 63c72789d9

View file

@ -258,6 +258,11 @@ wkb_buffer_ptr to_wkb(GeometryType const& g, wkbByteOrder byte_order )
wkb_buffer_ptr to_wkb(geometry_container const& paths, wkbByteOrder byte_order )
{
if (paths.size() < 1)
{
return nullptr;
}
if (paths.size() == 1)
{
// single geometry