Skip to content
Permalink
Browse files

Add zero pointer checks to avoid segfaults

  • Loading branch information
mhugent committed Sep 6, 2011
1 parent 67dfd2e commit 05cdd5247a3435f84be06a27a4b4e213ed861e7d
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/qgspallabeling.cpp
@@ -495,6 +495,10 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
}

QgsGeometry* geom = f.geometry();
if ( !geom )
{
return;
}

if ( ct ) // reproject the geometry if necessary
geom->transform( *ct );
@@ -511,6 +515,10 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
if ( do_clip )
{
geomClipped = geom->intersection( extentGeom ); // creates new geometry
if ( !geomClipped )
{
return;
}
geos_geom = geomClipped->asGeos();
}
else

0 comments on commit 05cdd52

Please sign in to comment.
You can’t perform that action at this time.