source file of the GNU LilyPond music typesetter
- (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1998--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
+#include "music-sequence.hh"
+
#include "warn.hh"
#include "program-option.hh"
-#include "pitch.hh"
+#include "music.hh"
#include "input.hh"
-#include "music-sequence.hh"
void
transpose_music_list (SCM lst, Pitch rq)
for (SCM s = l; scm_is_pair (s); s = scm_cdr (s))
{
Music *m = unsmob_music (scm_car (s));
- Moment l = m->get_length ();
- dur = max (dur, l);
+ if (!m)
+ programming_error ("Music sequence should have music elements");
+ else
+ {
+ Moment l = m->get_length ();
+ dur = max (dur, l);
+ }
}
return dur;