From: hanwen Date: Thu, 8 Sep 2005 21:31:19 +0000 (+0000) Subject: * lily/tie.cc (get_configuration): don't crash if left_dot is NULL. X-Git-Tag: release/2.7.16^2~170 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=342fbdcd5ceb4ae9774bebbf8c03242bd8e74a3c;p=lilypond.git * lily/tie.cc (get_configuration): don't crash if left_dot is NULL. * flower/include/real.hh: std::fabs too. --- diff --git a/ChangeLog b/ChangeLog index 971bfd1f27..6534f18e44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-09-08 Han-Wen Nienhuys + + * lily/tie.cc (get_configuration): don't crash if left_dot is NULL. + + * flower/include/real.hh: std::fabs too. + 2005-09-08 Jan Nieuwenhuizen * Documentation/user/instrument-notation.itely (Entering lyrics): diff --git a/flower/include/real.hh b/flower/include/real.hh index e44094f072..f4248f5d2f 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -18,6 +18,7 @@ extern const Real infinity_f; using namespace std; using std::isnan; using std::isinf; +using std::fabs; template inline T abs (T x) { diff --git a/lily/tie.cc b/lily/tie.cc index 6e62f424f0..5efe2d072d 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -261,7 +261,9 @@ Tie::get_configuration (Grob *me_grob, Grob *common, Avoid dot */ Grob *left_dot = unsmob_grob (me->get_bound (LEFT)->get_object ("dot")); - int dot_pos = int (Staff_symbol_referencer::get_position (left_dot)); + int dot_pos = dot_pos + ? int (Staff_symbol_referencer::get_position (left_dot)) + : 0; if (left_dot && (staff_position == dot_pos || staff_position + dir == dot_pos))