]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't crash if vertical spacing is called early.
authorJoe Neeman <joeneeman@gmail.com>
Wed, 23 Dec 2009 09:00:11 +0000 (01:00 -0800)
committerJoe Neeman <joeneeman@gmail.com>
Sun, 10 Jan 2010 01:39:33 +0000 (12:39 +1100)
This provides some more robustness against problems of the sort that
was fixed in 64aa24acd2.

lily/align-interface.cc

index f090cfd1e037b224e68d083f8ba578b210ff63b2..e9d47a77ec46a9ff829985cc651f8b31c3a158b7 100644 (file)
@@ -240,9 +240,13 @@ void
 Align_interface::align_elements_to_ideal_distances (Grob *me)
 {
   System *sys = me->get_system ();
-  Page_layout_problem layout (NULL, SCM_EOL, scm_list_1 (sys->self_scm ()));
-
-  layout.solution (true);
+  if (sys)
+    {
+      Page_layout_problem layout (NULL, SCM_EOL, scm_list_1 (sys->self_scm ()));
+      layout.solution (true);
+    }
+  else
+    programming_error ("vertical alignment called before line breaking");
 }
 
 void