]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/align-interface.cc
Don't crash if vertical spacing is called early.
[lilypond.git] / 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