From 928ef805a41ceafc2fe77ab844e89f028ea61da3 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 23:22:04 +0000 Subject: [PATCH] lilypond-1.3.53 --- lily/spanner.cc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lily/spanner.cc b/lily/spanner.cc index d3623668e1..c384224889 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -25,6 +25,9 @@ Spanner::do_break_processing () //break_into_pieces Item * left = spanned_drul_[LEFT]; Item * right = spanned_drul_[RIGHT]; + + if (!left || !right) + return; if (left == right) { @@ -92,14 +95,17 @@ Spanner::do_break_processing () Direction d = LEFT; do { - Item *&pc_l = bounds[d] ; - if (!pc_l->line_l()) - pc_l = pc_l->find_prebroken_piece(- d); - - assert (pc_l); + if (!bounds[d]->line_l()) + bounds[d] = bounds[d]->find_prebroken_piece(- d); } while ((flip(&d))!= LEFT); + if (!bounds[LEFT] || ! bounds[RIGHT]) + { + programming_error ("bounds of this piece aren't breakable. "); + continue; + } + Spanner *span_p = dynamic_cast(clone ()); span_p->set_bound(LEFT,bounds[LEFT]); span_p->set_bound(RIGHT,bounds[RIGHT]); @@ -159,8 +165,8 @@ Spanner::set_bound(Direction d, Item*i) } /** - Prevent the column -> line_of_score -> column -> line_of_score -> etc situation - */ + We check for Line_of_score to prevent the column -> line_of_score + -> column -> line_of_score -> etc situation */ if (d== LEFT && !dynamic_cast (this)) { set_parent (i, X_AXIS); -- 2.39.5