---
 common/lines.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/lines.c b/common/lines.c
index 10ca318..e5097c4 100644
--- a/common/lines.c
+++ b/common/lines.c
@@ -412,7 +412,7 @@ miStepDash (int dist,           /* distance to step */
     totallen = 0;
     for (i = 0; i < numInDashList; i++)
         totallen += pDash[i];
-    if (totallen <= dist)
+    if (totallen > 0 && totallen <= dist)
         dist = dist % totallen;
     while (dist >= pDash[dashIndex]) {
         dist -= pDash[dashIndex];
-- 
2.7.3

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to