Skip to content

Commit

Permalink
Avoid coverity null dereference after null check warning
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 27, 2017
1 parent 7387d74 commit 1f927ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/geometry/qgstriangle.cpp
Expand Up @@ -301,8 +301,8 @@ void QgsTriangle::setExteriorRing( QgsCurve *ring )
{
return;
}
QgsLineString *lineString = dynamic_cast< QgsLineString *>( ring );
if ( lineString && !lineString->isClosed() )
QgsLineString *lineString = static_cast< QgsLineString *>( ring );
if ( !lineString->isClosed() )
{
lineString->close();
}
Expand Down

0 comments on commit 1f927ab

Please sign in to comment.