[processing] avoid division by zero in random points alg (fix #11215)

This commit is contained in:
Alexander Bruy 2014-09-19 20:05:01 +03:00
parent 8c327ed35e
commit cc307578eb

View File

@ -92,6 +92,9 @@ class RandomPointsPolygonsVariable(GeoAlgorithm):
else:
pointCount = int(round(f[fieldName] * da.measure(fGeom)))
if strategy == 0 and pointCount == 0:
continue
index = QgsSpatialIndex()
points = dict()