]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/beam.cc
(shift_region_to_valid): divide by zero fix. This
[lilypond.git] / lily / beam.cc
index a7c9a61e718ea60ff4f92e96b7eae681119ccc11..38120cd681156f9038f67e53cf069cadfd4795d0 100644 (file)
@@ -941,7 +941,7 @@ Beam::shift_region_to_valid (SCM grob)
 
   Real dy = pos[RIGHT] - pos[LEFT];
   Real y = pos[LEFT];
-  Real slope = dy / dx;
+  Real slope = dx ? (dy / dx) : 0.0;
 
   /*
     Shift the positions so that we have a chance of finding good