Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix use after free when rendering 3d linestrings
  • Loading branch information
nyalldawson authored and github-actions[bot] committed Apr 17, 2023
1 parent cc99e4b commit 14506e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/symbology/qgssymbol.cpp
Expand Up @@ -104,13 +104,13 @@ QPolygonF QgsSymbol::_getLineString3d( QgsRenderContext &context, const QgsCurve
const QgsBox3d clipRect( e.xMinimum() - cw, e.yMinimum() - ch, -HUGE_VAL, e.xMaximum() + cw, e.yMaximum() + ch, HUGE_VAL ); // TODO also need to be clipped according to z axis

const QgsLineString *lineString = nullptr;
std::unique_ptr< QgsLineString > segmentized;
if ( const QgsLineString *ls = qgsgeometry_cast< const QgsLineString * >( &curve ) )
{
lineString = ls;
}
else
{
std::unique_ptr< QgsLineString > segmentized;
segmentized.reset( qgsgeometry_cast< QgsLineString * >( curve.segmentize( ) ) );
lineString = segmentized.get();
}
Expand Down

0 comments on commit 14506e3

Please sign in to comment.