]> git.donarmstrong.com Git - lilypond.git/commitdiff
don't crash on an empty eps file
authorJoe Neeman <joeneeman@gmail.com>
Sat, 21 Jul 2007 11:43:41 +0000 (21:43 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 21 Jul 2007 11:43:41 +0000 (21:43 +1000)
scm/stencil.scm

index db35a5ecc54af4228b43c2bcb2b5b72ef8f86603..127a5f62ad95f442c3ae090d6cdae6ee03c0d3d4 100644 (file)
@@ -279,7 +279,9 @@ encloses the contents.
                      (- (list-ref bbox 2) (list-ref bbox 0))
                      (- (list-ref bbox 3) (list-ref bbox 1))
                      ))
-       (factor (exact->inexact (/ size bbox-size)))
+       (factor (if (< 0 bbox-size)
+                  (exact->inexact (/ size bbox-size))
+                  0))
        (scaled-bbox
        (map (lambda (x) (* factor x)) bbox))
        (clip-rect-string (ly:format