From: Reinhold Kainhofer Date: Wed, 19 Dec 2007 22:28:24 +0000 (+0100) Subject: Partcombine: Fix crash when empty music is passed X-Git-Tag: release/2.11.39-1~1^2~20 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=17dd34fba0bea779168c8b1f9346438abfc8248e;p=lilypond.git 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... Signed-off-by: Reinhold Kainhofer --- diff --git a/scm/part-combiner.scm b/scm/part-combiner.scm index 81c6e36850..2f4d37a434 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)