Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 14506e3

Browse files
nyalldawsongithub-actions[bot]
authored andcommittedApr 17, 2023
Fix use after free when rendering 3d linestrings
1 parent cc99e4b commit 14506e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/symbology/qgssymbol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ QPolygonF QgsSymbol::_getLineString3d( QgsRenderContext &context, const QgsCurve
104104
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
105105

106106
const QgsLineString *lineString = nullptr;
107+
std::unique_ptr< QgsLineString > segmentized;
107108
if ( const QgsLineString *ls = qgsgeometry_cast< const QgsLineString * >( &curve ) )
108109
{
109110
lineString = ls;
110111
}
111112
else
112113
{
113-
std::unique_ptr< QgsLineString > segmentized;
114114
segmentized.reset( qgsgeometry_cast< QgsLineString * >( curve.segmentize( ) ) );
115115
lineString = segmentized.get();
116116
}

0 commit comments

Comments
 (0)
Please sign in to comment.