From: Han-Wen Nienhuys <hanwen@lilypond.org>
Date: Fri, 4 Feb 2011 11:57:53 +0000 (-0200)
Subject: Don't crash for tremolo beams.
X-Git-Tag: release/2.13.48-1~1^2
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=334f5a4b1a756eaa161b230bc799651152044fd8;p=lilypond.git

Don't crash for tremolo beams.
---

diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc
index 4b822cbac4..43c8f393b2 100644
--- a/lily/beam-quanting.cc
+++ b/lily/beam-quanting.cc
@@ -201,6 +201,10 @@ void Beam_scoring_problem::init_stems ()
   d = LEFT;
   do
     {
+      quant_range[d].set_full ();
+      if (!edge_stems[d])
+        continue;
+      
       Real stem_offset = edge_stems[d]->relative_coordinate (common[Y_AXIS], Y_AXIS)
         - beam->relative_coordinate (common[Y_AXIS], Y_AXIS);
       Interval heads = Stem::head_positions(edge_stems[d]) * 0.5 * staff_space;
@@ -208,7 +212,6 @@ void Beam_scoring_problem::init_stems ()
       Direction ed = edge_dirs[d];
       heads.widen(0.5 * staff_space
                   + (edge_beam_counts[d] - 1) * beam_translation + beam_thickness * .5);
-      quant_range[d][ed] = ed * infinity_f;
       quant_range[d][-ed] = heads[ed] + stem_offset;
     }
   while (flip (&d) != LEFT);