bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 1336 in lilypond: skipTypesetting segfaults when set during a


From: lilypond
Subject: Re: Issue 1336 in lilypond: skipTypesetting segfaults when set during a skipBars-induced MultiMeasureRest spanner
Date: Mon, 01 Nov 2010 14:12:13 +0000


Comment #3 on issue 1336 by percival.music.ca: skipTypesetting segfaults when set during a skipBars-induced MultiMeasureRest spanner
http://code.google.com/p/lilypond/issues/detail?id=1336

Here's a not-serious patch to avoid the crash. Note that I haven't used the proper way to quit, and probably shouldn't be using programmer_error() anyway.

The point of this is just to move development to the next stage:
- either figure out why centered_on_object(NULL, a) is called with a null pointer, or - decide we don't care, and just write a nice "bailing" message (and quit with the appropriate function, which is probably not exit(1)).



diff --git a/lily/self-alignment-interface.cc b/lily/self-alignment-interface.cc
index e339e80..615c732 100644
--- a/lily/self-alignment-interface.cc
+++ b/lily/self-alignment-interface.cc
@@ -66,6 +66,11 @@ Self_alignment_interface::aligned_on_self (Grob *me, Axis a,
 SCM
 Self_alignment_interface::centered_on_object (Grob *him, Axis a)
 {
+  if (him == NULL) {
+    programming_error ("Do not have an object to center on!");
+    programming_error ("(quitting, despite the next message you see. :)");
+    exit (1);
+  }
   return scm_from_double (robust_relative_extent (him, him, a).center ());
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]