Skip to content

Commit cc30757

Browse files
committedSep 19, 2014
[processing] avoid division by zero in random points alg (fix #11215)
1 parent 8c327ed commit cc30757

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎python/plugins/processing/algs/qgis/RandomPointsPolygonsVariable.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ def processAlgorithm(self, progress):
9292
else:
9393
pointCount = int(round(f[fieldName] * da.measure(fGeom)))
9494

95+
if strategy == 0 and pointCount == 0:
96+
continue
97+
9598
index = QgsSpatialIndex()
9699
points = dict()
97100

0 commit comments

Comments
 (0)
Please sign in to comment.