Skip to content
Permalink
Browse files
Fixed bad_alloc exception followed by a deadlock when working with in…
…valid geometry.

git-svn-id: http://svn.osgeo.org/qgis/branches/symbology-ng-branch@10913 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jun 12, 2009
1 parent 7100a3b commit 7523b25
Showing 1 changed file with 5 additions and 0 deletions.
@@ -347,6 +347,11 @@ void Layer::registerFeature( const char *geom_id, PalGeometry *userGeom, double
//case geos::geom::GEOS_POINT:
//case geos::geom::GEOS_LINESTRING:
//case geos::geom::GEOS_POLYGON:

// ignore invalid geometries
if ( (f->type == GEOS_LINESTRING && f->nbPoints < 2) ||
(f->type == GEOS_POLYGON && f->nbPoints < 3) )
continue;
#ifdef _DEBUG_FULL_
std::cout << "Create Feat" << std::endl;
#endif

0 comments on commit 7523b25

Please sign in to comment.