From: Erlend Aasland Date: Fri, 11 Jan 2008 01:14:34 +0000 (+0100) Subject: Fix issue 542: Harden Grob::relative_coordinate() X-Git-Tag: release/2.11.38-1~107 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=54d7ede54447e7837b5b697bd919f895649c5e50;p=lilypond.git Fix issue 542: Harden Grob::relative_coordinate() --- diff --git a/lily/grob.cc b/lily/grob.cc index fbb4683f4a..7f78b5ff60 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -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