]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix issue 542: Harden Grob::relative_coordinate()
authorErlend Aasland <erlend.aasland@mac.com>
Fri, 11 Jan 2008 01:14:34 +0000 (02:14 +0100)
committerErlend Aasland <erlend.aasland@mac.com>
Fri, 11 Jan 2008 01:14:34 +0000 (02:14 +0100)
lily/grob.cc

index fbb4683f4a7f2173c1d9e70b2afe7d86db73cd20..7f78b5ff60112937bc5745106da7e2b96535fcab 100644 (file)
@@ -265,7 +265,8 @@ Grob::translate_axis (Real y, Axis a)
 Real
 Grob::relative_coordinate (Grob const *refp, Axis a) const
 {
-  if (refp == this)
+  /* eaa - hmmm, should we do a programming_error() here? */
+  if ((this == NULL) || (refp == this))
     return 0.0;
 
   /* We catch PARENT_L_ == nil case with this, but we crash if we did