From: Han-Wen Nienhuys Date: Sat, 9 Dec 2006 11:42:07 +0000 (+0100) Subject: only inspect 'element if it exists. Fixes #172 X-Git-Tag: release/2.10.2-1~39 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a0dd5894388c6e9769c3b242f4f409d9e1494543;p=lilypond.git only inspect 'element if it exists. Fixes #172 --- 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 (); }