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
wonder committed Jun 12, 2009
1 parent 7100a3b commit 7523b2511f5391e6b0f063b4b352efc586b9fab1
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/pal/layer.cpp
@@ -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.
You can’t perform that action at this time.