From 75f5824b4a47584b4ab0bd722debfb815575884a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 9 Dec 2006 12:42:07 +0100 Subject: [PATCH] only inspect 'element if it exists. Fixes #172 --- lily/music-wrapper.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 456af661cc..051187a8a4 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -25,6 +25,9 @@ Music_wrapper::length_callback (SCM m) { Music *me = unsmob_music (m); Music *elt = unsmob_music (me->get_property ("element")); - return elt->get_length ().smobbed_copy (); + if (elt) + return elt->get_length ().smobbed_copy (); + else + return Moment (0).smobbed_copy (); } -- 2.39.5