File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -897,6 +897,7 @@ QgsAbstractGeometry* _qgis_lwgeom_make_valid( const QgsAbstractGeometry& lwgeom_
897
897
898
898
// try to convert to GEOS, if impossible, clean that up first
899
899
// otherwise (adding only duplicates of existing points)
900
+ GEOSContextHandle_t handle = QgsGeos::getGEOSHandler ();
900
901
901
902
GEOSGeometry* geosgeom = QgsGeos::asGeos ( &lwgeom_in );
902
903
if ( ! geosgeom )
@@ -927,11 +928,12 @@ QgsAbstractGeometry* _qgis_lwgeom_make_valid( const QgsAbstractGeometry& lwgeom_
927
928
}
928
929
929
930
GEOSGeometry* geosout = LWGEOM_GEOS_makeValid ( geosgeom, errorMessage );
930
- GEOSGeom_destroy ( geosgeom );
931
+ GEOSGeom_destroy_r ( handle, geosgeom );
931
932
if ( !geosout )
932
933
return NULL ;
933
934
934
935
QgsAbstractGeometry* lwgeom_out = QgsGeos::fromGeos ( geosout );
936
+ GEOSGeom_destroy_r ( handle, geosout );
935
937
if ( !lwgeom_out )
936
938
return NULL ;
937
939
You can’t perform that action at this time.
0 commit comments