]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Issue 4961/5: Change rotations to degrees rather than radians
[lilypond.git] / lily / grob.cc
index 7ce89d50158ff737e2e702609c1f7750422b84d6..eafa66288efdab93c9ab72bf49a3831c749c24b2 100644 (file)
@@ -333,7 +333,7 @@ Real
 Grob::relative_coordinate (Grob const *refp, Axis a) const
 {
   /* eaa - hmmm, should we do a programming_error() here? */
-  if ((this == NULL) || (refp == this))
+  if (refp == this)
     return 0.0;
 
   /* We catch PARENT_L_ == nil case with this, but we crash if we did
@@ -342,7 +342,8 @@ Grob::relative_coordinate (Grob const *refp, Axis a) const
   if (refp == dim_cache_[a].parent_)
     return off;
 
-  off += dim_cache_[a].parent_->relative_coordinate (refp, a);
+  if (dim_cache_[a].parent_ != NULL)
+    off += dim_cache_[a].parent_->relative_coordinate (refp, a);
 
   return off;
 }