]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/hyphen-spanner.cc
release: 1.3.145
[lilypond.git] / lily / hyphen-spanner.cc
index 433a107ba6ae989e1a538147260c474053b20d8b..cd676ff44a40bc0faeadcd5fa05198852b87525f 100644 (file)
@@ -37,7 +37,11 @@ Hyphen_spanner::brew_molecule (SCM smob)
   
   do
     {
-      bounds[d] = sp->get_bound (d)->extent (common, X_AXIS)[-d];
+      Interval iv = sp->get_bound (d)->extent (common, X_AXIS);
+
+      bounds[d] = iv.empty_b ()
+       ? sp->get_bound (d)->relative_coordinate (common, X_AXIS)
+       : iv[-d];
     }
   while (flip (&d) != LEFT);