]> git.donarmstrong.com Git - lilypond.git/commitdiff
(shift_region_to_valid): prevent division by
authorhanwen <hanwen>
Thu, 4 Aug 2005 15:57:47 +0000 (15:57 +0000)
committerhanwen <hanwen>
Thu, 4 Aug 2005 15:57:47 +0000 (15:57 +0000)
zero. Fixes beams across line breaks with 1 stem after the break.

ChangeLog
lily/beam.cc

index 7393877f33ebc88ad4dcfa053f6acc1504b49d62..2b701e16de3c22cd4c42f05c1db72007078c968f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-08-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/beam.cc (shift_region_to_valid): prevent division by
+       zero. Fixes beams across line breaks with 1 stem after the break.  
+
+       * VERSION: release 2.6.3
+       
        * lily/auto-beam-engraver.cc (derived_mark): new method. Yes. We
        have to protect even those unlikely-to-be-corrupted data members.  
   
index 868470c3b52ae07a6339570c3b7ab32f4e49c870..2a7c04d78fb97fdfffd841f835b14733f8e5576e 100644 (file)
@@ -946,7 +946,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