From: daid Date: Mon, 26 Aug 2013 14:02:43 +0000 (+0200) Subject: Make sure you cannot get a division by zero exception. X-Git-Tag: 13.10~88 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0f7819e47221b24b22ef440f9bdad6d377721254;p=cura.git Make sure you cannot get a division by zero exception. --- diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 90f32b41..a886f1d1 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -660,6 +660,8 @@ def calculateLineCount(): return 1 lineCount = int(wallThickness / (nozzleSize - 0.0001)) + if lineCount < 1: + lineCount = 1 lineWidth = wallThickness / lineCount lineWidthAlt = wallThickness / (lineCount + 1) if lineWidth > nozzleSize * 1.5: