Skip to content

Commit deb9667

Browse files
committed
[processing] check symmetrical difference result before using it in
other geometry operations (fix #16010)
1 parent 9149ffb commit deb9667

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/plugins/processing/algs/qgis/Intersection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ def processAlgorithm(self, progress):
121121
int_geom = QgsGeometry()
122122
if int_com is not None:
123123
int_sym = geom.symDifference(tmpGeom)
124-
int_geom = QgsGeometry(int_com.difference(int_sym))
124+
if int_sym:
125+
diff_geom = int_com.difference(int_sym)
126+
int_geom = QgsGeometry(diff_geom)
127+
125128
if int_geom.isGeosEmpty() or not int_geom.isGeosValid():
126129
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
127130
self.tr('GEOS geoprocessing error: One or '

0 commit comments

Comments
 (0)