avoid segfault if geometry is so invalid that no reference is returned and we cannot check if it is empty - closes #574
This commit is contained in:
parent
22fc14ef05
commit
c7f136db91
2 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@ feature_ptr ogr_featureset::next()
|
|||
if ((*feat) != NULL)
|
||||
{
|
||||
OGRGeometry* geom=(*feat)->GetGeometryRef();
|
||||
if (!geom->IsEmpty())
|
||||
if (geom && !geom->IsEmpty())
|
||||
{
|
||||
feature_ptr feature(new Feature((*feat)->GetFID()));
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
if ((*feat) != NULL)
|
||||
{
|
||||
OGRGeometry* geom=(*feat)->GetGeometryRef();
|
||||
if (!geom->IsEmpty())
|
||||
if (geom && !geom->IsEmpty())
|
||||
{
|
||||
feature_ptr feature(new Feature((*feat)->GetFID()));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue