]> git.donarmstrong.com Git - lilypond.git/commitdiff
Check for empty extent in Bar_line::calc_anchor
authorJoe Neeman <joeneeman@gmail.com>
Wed, 16 May 2007 21:41:30 +0000 (07:41 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Wed, 16 May 2007 21:41:30 +0000 (07:41 +1000)
lily/bar-line.cc

index 7a1e92de376f3b576b91443e48b7ed1fb88f89b0..48b9c4715da6e4e09631bb7b873812b82e123ddc 100644 (file)
@@ -250,6 +250,9 @@ Bar_line::calc_anchor (SCM smob)
      a repeat bar, in which case we put the anchor in the center of
      the barline without the dots. */
   Interval ext = me->extent (me, X_AXIS);
+  if (ext.is_empty ())
+    return scm_from_double (0);
+
   Real anchor = ext.center ();
 
   Stencil dot = Font_interface::get_default_font (me)->find_by_name ("dots.dot");