]> git.donarmstrong.com Git - lilypond.git/commitdiff
accidental.cc: do not crash on missing stencils
authorKeith OHara <k-ohara5a5a@oco.net>
Sat, 24 Aug 2013 21:48:18 +0000 (14:48 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Sun, 25 Aug 2013 03:24:59 +0000 (20:24 -0700)
lily/accidental.cc

index 0cf270f52aa60124a31fdb836fda1704fb71ec53..ce05dfff722f6ed9d7847714415000babf2538cb 100644 (file)
@@ -83,14 +83,14 @@ Accidental_interface::horizontal_skylines (SCM smob)
    * We use the more basic get_stencil.
    */
   Stencil *my_stencil = unsmob_stencil (get_stencil (me));
+  if (!my_stencil)
+    return Skyline_pair ().smobbed_copy ();
+
   Skyline_pair *sky =
     Skyline_pair::unsmob
       (Stencil::skylines_from_stencil
         (my_stencil->smobbed_copy (), 0.0, Y_AXIS));
 
-  if (!sky)
-    return Skyline_pair ().smobbed_copy ();
-
   SCM alist = me->get_property ("glyph-name-alist");
   SCM alt = me->get_property ("alteration");
   string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F),