X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftie.cc;h=dcc53ad44e61c7af5ee5522ce3d8b18a19b56eb4;hb=5d84bfad4626892bcffd05adcced53c8a2329047;hp=849e859eb59e1d38689b6e42daa621f75288451a;hpb=8920247a80a350aaab540166ab7a4937f45786a6;p=lilypond.git diff --git a/lily/tie.cc b/lily/tie.cc index 849e859eb5..dcc53ad44e 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -45,13 +45,20 @@ bool Tie::less (Grob *g1, Grob *g2) { Spanner *s1 = dynamic_cast (g1); + if (!s1) + { + g1->programming_error ("grob is not a tie"); + return false; + } + Spanner *s2 = dynamic_cast (g2); - if (s1 && s2) { - return get_position (s1) < get_position (s2); - } + if (!s2) + { + g2->programming_error ("grob is not a tie"); + return true; + } - programming_error ("grob is not a tie"); - return false; + return get_position (s1) < get_position (s2); } void