From 7f4aac0fe832e5fe3ea5956cd4cb06d8fccfc5f1 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Wed, 19 Dec 2007 23:28:24 +0100 Subject: [PATCH] Partcombine: Fix crash when empty music is passed I usually start with the general structure of a large score and only then fill it with music. This means that partcombine is fed two empty music expressions (or only containing one multi-measure rest each), so that evs1 and evs2 won't contain data and (assoc "one" evs1) will be an empty list => cdr on it will crash. In this case, simply set the split list to an empty list and don't crash... --- scm/part-combiner.scm | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scm/part-combiner.scm b/scm/part-combiner.scm index 81c6e36..2f4d37a 100644 --- a/scm/part-combiner.scm +++ b/scm/part-combiner.scm @@ -230,8 +230,10 @@ Voice-state objects (set! (ly:music-property m 'elements) (list m1 m2)) (set! (ly:music-property m 'split-list) - (determine-split-list (reverse! (cdr (assoc "one" evs1)) '()) - (reverse! (cdr (assoc "two" evs2)) '()))) + (if (and (assoc "one" evs1) (assoc "two" evs2)) + (determine-split-list (reverse! (cdr (assoc "one" evs1)) '()) + (reverse! (cdr (assoc "two" evs2)) '())) + '() )) m)) (define-public (determine-split-list evl1 evl2) -- 1.5.3.7