Skip to content

Commit

Permalink
Add guard against nullptr dereference (Coverity warning)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 31, 2017
1 parent 133d58f commit 9a07cd5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsmaptopixelgeometrysimplifier.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9a07cd5

Please sign in to comment.