Skip to content
Permalink
Browse files
Add guard against nullptr dereference (Coverity warning)
  • Loading branch information
nyalldawson committed Aug 31, 2017
1 parent 133d58f commit 9a07cd5
Showing 1 changed file with 2 additions and 0 deletions.
@@ -107,7 +107,9 @@ static QgsGeometry generalizeWkbGeometryByBoundingBox(
template<class T>
static T *createEmptySameTypeGeom( const T &geom )
{
// TODO - this is inefficient - we clone the geometry's content only to throw it away immediately
T *output( qgsgeometry_cast<T *>( geom.clone() ) );
Q_ASSERT( output );
output->clear();
return output;
}

0 comments on commit 9a07cd5

Please sign in to comment.