2db9998
@@ -, +, @@ 
2db9998
---
2db9998
 lily/grob.cc | 5 +++--
2db9998
 1 file changed, 3 insertions(+), 2 deletions(-)
2db9998
--- a/lily/grob.cc	
2db9998
+++ a/lily/grob.cc	
2db9998
@@ -333,7 +333,7 @@ Real
2db9998
 Grob::relative_coordinate (Grob const *refp, Axis a) const
2db9998
 {
2db9998
   /* eaa - hmmm, should we do a programming_error() here? */
2db9998
-  if ((this == NULL) || (refp == this))
2db9998
+  if (refp == this)
2db9998
     return 0.0;
2db9998
 
2db9998
   /* We catch PARENT_L_ == nil case with this, but we crash if we did
2db9998
@@ -342,7 +342,8 @@ Grob::relative_coordinate (Grob const *refp, Axis a) const
2db9998
   if (refp == dim_cache_[a].parent_)
2db9998
     return off;
2db9998
 
2db9998
-  off += dim_cache_[a].parent_->relative_coordinate (refp, a);
2db9998
+  if (dim_cache_[a].parent_ != NULL)
2db9998
+    off += dim_cache_[a].parent_->relative_coordinate (refp, a);
2db9998
 
2db9998
   return off;
2db9998
 }
2db9998
--