]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't segfault if a note has a script without having a stem.
authorJoe Neeman <joeneeman@gmail.com>
Sat, 10 Feb 2007 12:25:12 +0000 (14:25 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 10 Feb 2007 12:25:12 +0000 (14:25 +0200)
lily/script-interface.cc

index faa5504942df6d41e191aeec6da866b404ea68b4..8e142179b4f2fbc211cc961ac534eb800a497a27 100644 (file)
@@ -71,7 +71,7 @@ Script_interface::calc_cross_staff (SCM smob)
 {
   Grob *me = unsmob_grob (smob);
   Grob *stem = Note_column::get_stem (me->get_parent (X_AXIS));
-  return stem->get_property ("cross-staff");
+  return scm_from_bool (stem && to_boolean (stem->get_property ("cross-staff")));
 }
 
 MAKE_SCHEME_CALLBACK (Script_interface, print, 1);