]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/self-alignment-interface.cc
Merge branch 'fixedtranslation' into HEAD
[lilypond.git] / lily / self-alignment-interface.cc
index edf0b2395dbd6a533255a921cf8c17037e634519..ddf08f5ba50df8137b07381db3c239ca43082a2a 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2004--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2004--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -59,9 +59,7 @@ Self_alignment_interface::aligned_on_self (Grob *me, Axis a, bool pure, int star
   if (scm_is_number (align))
     {
       Interval ext (me->maybe_pure_extent (me, a, pure, start, end));
-      if (ext.is_empty ())
-        programming_error ("cannot align on self: empty element");
-      else
+      if (!ext.is_empty ())
         return scm_from_double (- ext.linear_combination (scm_to_double (align)));
     }
   return scm_from_double (0.0);