X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Frest-collision.cc;h=959bf2156b25338711cab33e5430dcd923a4c4ab;hb=3b2883eac4e40ebab564cb47fd446c3d31063bff;hp=a2c9fa63c0e7e497ab6f22a6f1b9d7238384635c;hpb=621e5fb6a5c3cb67c46082e561cffad691ead30c;p=lilypond.git diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index a2c9fa63c0..959bf2156b 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -40,7 +40,7 @@ Rest_collision::force_shift_callback (SCM smob) return scm_from_double (0.0); } -MAKE_SCHEME_CALLBACK (Rest_collision, force_shift_callback_rest, 2); +MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Rest_collision, force_shift_callback_rest, 2, 1); SCM Rest_collision::force_shift_callback_rest (SCM rest, SCM offset) { @@ -51,7 +51,8 @@ Rest_collision::force_shift_callback_rest (SCM rest, SCM offset) translate REST; we need the result of this translation later on, while the offset probably still is 0/calculation-in-progress. */ - rest_grob->translate_axis (scm_to_double (offset), Y_AXIS); + if (scm_is_number (offset)) + rest_grob->translate_axis (scm_to_double (offset), Y_AXIS); if (Note_column::has_interface (parent)) force_shift_callback (parent->self_scm ());