mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix #12190 - splitGeometry crashes on linear geometry with a split point
This commit is contained in:
parent
90bd24a33b
commit
3803979b2b
@ -4661,7 +4661,8 @@ GEOSGeometry* QgsGeometry::linePointDifference( GEOSGeometry* GEOSsplitPoint )
|
||||
else
|
||||
return 0;
|
||||
|
||||
QgsGeometry* geosPoint = fromGeosGeom( GEOSsplitPoint );
|
||||
// GEOSsplitPoint will be deleted in the caller, so make a clone
|
||||
QgsGeometry* geosPoint = fromGeosGeom( GEOSGeom_clone_r( geosinit.ctxt, GEOSsplitPoint ) );
|
||||
QgsPoint splitPoint = geosPoint->asPoint();
|
||||
delete geosPoint;
|
||||
|
||||
@ -4746,9 +4747,7 @@ int QgsGeometry::splitLinearGeometry( GEOSGeometry *splitLine, QList<QgsGeometry
|
||||
|
||||
if ( lineGeoms.size() > 0 )
|
||||
{
|
||||
GEOSGeom_destroy_r( geosinit.ctxt, mGeos );
|
||||
mGeos = lineGeoms[0];
|
||||
mDirtyWkb = true;
|
||||
fromGeos( lineGeoms[0] );
|
||||
}
|
||||
|
||||
for ( int i = 1; i < lineGeoms.size(); ++i )
|
||||
|
Loading…
x
Reference in New Issue
Block a user