Skip to content
Permalink
Browse files
Fix #12190 - splitGeometry crashes on linear geometry with a split point
  • Loading branch information
wonder-sk committed Feb 12, 2015
1 parent 90bd24a commit 3803979b2b95a83bc8f9bc2a449bfe80de8bb6ac
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/core/qgsgeometry.cpp
@@ -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 )

5 comments on commit 3803979

@jef-n

This comment has been minimized.

Copy link
Member

@jef-n jef-n replied Feb 12, 2015

You're not investigating why QGIS crashes when the snap locator is removed - because that's what I'm also investigating now...

@3nids

This comment has been minimized.

Copy link
Member

@3nids 3nids replied Feb 12, 2015

multi-threaded bug fixing? ;)

@wonder-sk

This comment has been minimized.

Copy link
Member Author

@wonder-sk wonder-sk replied Feb 12, 2015

I'm not sure I follow :)

@jef-n

This comment has been minimized.

Copy link
Member

@jef-n jef-n replied Feb 12, 2015

Well, I discovered a snapping related problem after I fixed the bug - I just wanted to make sure that you didn't also find it - because for that there is no issue mutex to aquire.

@wonder-sk

This comment has been minimized.

Copy link
Member Author

@wonder-sk wonder-sk replied Feb 12, 2015

Oh I see now - I haven't seen such problem... Thanks for the fix, I will try to honor the mutex locking scheme from now!

Please sign in to comment.