Skip to content

Commit 62cb381

Browse files
committed
[processing] prevent divizion by zero (fix #15825)
1 parent 2fea23f commit 62cb381

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def processAlgorithm(self, progress):
108108
inFeat = QgsFeature()
109109

110110
current = 0
111+
if len(c.polygons) == 0:
112+
raise GeoAlgorithmExecutionException(
113+
self.tr('There were no polygons created.'))
114+
111115
total = 100.0 / len(c.polygons)
112116

113117
for (site, edges) in list(c.polygons.items()):

0 commit comments

Comments
 (0)