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 9a07cd513a69a6ff5da66e53a405623eab8c467c
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/qgsmaptopixelgeometrysimplifier.cpp
@@ -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.
You can’t perform that action at this time.