Skip to content

Commit

Permalink
[processing] prevent divizion by zero (fix #15825)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 5, 2016
1 parent 2fea23f commit 62cb381
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/plugins/processing/algs/qgis/VoronoiPolygons.py
Expand Up @@ -108,6 +108,10 @@ def processAlgorithm(self, progress):
inFeat = QgsFeature()

current = 0
if len(c.polygons) == 0:
raise GeoAlgorithmExecutionException(
self.tr('There were no polygons created.'))

total = 100.0 / len(c.polygons)

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

0 comments on commit 62cb381

Please sign in to comment.