Skip to content
Permalink
Browse files

Avoid crash

  • Loading branch information
m-kuhn committed Aug 12, 2017
1 parent 4c136a7 commit f70b5b54657d9ef8bca77efe4d4a412dcfd19449
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/geometry/qgscurve.h
@@ -145,8 +145,11 @@ class CORE_EXPORT QgsCurve: public QgsAbstractGeometry
*/
inline const QgsCurve *cast( const QgsAbstractGeometry *geom ) const
{
if ( !geom )
return nullptr;

QgsWkbTypes::Type type = geom->wkbType();
if ( geom && QgsWkbTypes::geometryType( type ) == QgsWkbTypes::LineGeometry && QgsWkbTypes::isSingleType( type ) )
if ( QgsWkbTypes::geometryType( type ) == QgsWkbTypes::LineGeometry && QgsWkbTypes::isSingleType( type ) )
{
return static_cast<const QgsCurve *>( geom );
}

0 comments on commit f70b5b5

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