]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix #1156.
authorPatrick McCarty <pnorcks@gmail.com>
Sun, 27 Jun 2010 19:57:22 +0000 (12:57 -0700)
committerPatrick McCarty <pnorcks@gmail.com>
Sun, 27 Jun 2010 19:57:22 +0000 (12:57 -0700)
Sometimes the check for the *left* broken neighbor may be a spacer rest,
which appears to be a generic Spanner with direction CENTER.

An additional check is needed to make sure the grob in question is a
Slur or PhrasingSlur, or else an assertion will be raised -- slurs must
have a direction of either UP or DOWN.

lily/slur-scoring.cc

index a43daa3ed430ebd0996f74cd42d220d3cf07ae81..a1f761acf269813964ce4806b6194ef5ca8899e5 100644 (file)
@@ -85,7 +85,9 @@ Slur_score_state::~Slur_score_state ()
 Direction
 Slur_score_state::slur_direction () const
 {
-  if (Grob *left_neighbor = slur_->broken_neighbor (LEFT))
+  Grob *left_neighbor = slur_->broken_neighbor (LEFT);
+
+  if (left_neighbor && Slur::has_interface (left_neighbor))
     return get_grob_direction (left_neighbor);
 
   Direction dir = get_grob_direction (slur_);