Rest_collision was calling Note_column functions on grobs that did not
have the Note_column interface. Now Rest_collision ignores such grobs
and Note_column will print a more accurate message if such an error
ever happens again.
return (Direction)sign (head_positions_interval (me).center ());
}
- programming_error ("note column without heads and stem");
+ if (has_interface (me))
+ programming_error ("Note_column without heads and stem");
+ else
+ programming_error ("dir() given grob without Note_column interface");
return CENTER;
}
for (vsize i = 0; i < elts.size (); i++)
{
Grob *e = elts[i];
- if (Grob::unsmob (e->get_object ("rest")))
- rests.push_back (e);
- else
- notes.push_back (e);
+ if (Note_column::has_interface (e))
+ {
+ if (Grob::unsmob (e->get_object ("rest")))
+ rests.push_back (e);
+ else
+ notes.push_back (e);
+ }
}
/*