We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 4c136a7 commit f70b5b5Copy full SHA for f70b5b5
src/core/geometry/qgscurve.h
@@ -145,8 +145,11 @@ class CORE_EXPORT QgsCurve: public QgsAbstractGeometry
145
*/
146
inline const QgsCurve *cast( const QgsAbstractGeometry *geom ) const
147
{
148
+ if ( !geom )
149
+ return nullptr;
150
+
151
QgsWkbTypes::Type type = geom->wkbType();
- if ( geom && QgsWkbTypes::geometryType( type ) == QgsWkbTypes::LineGeometry && QgsWkbTypes::isSingleType( type ) )
152
+ if ( QgsWkbTypes::geometryType( type ) == QgsWkbTypes::LineGeometry && QgsWkbTypes::isSingleType( type ) )
153
154
return static_cast<const QgsCurve *>( geom );
155
}
0 commit comments