From 35cd7ecf14b5ffa19d5f6718ef333273abcf62fd Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 8 Sep 2005 21:31:19 +0000 Subject: [PATCH] * lily/tie.cc (get_configuration): don't crash if left_dot is NULL. * flower/include/real.hh: std::fabs too. --- ChangeLog | 6 ++++++ flower/include/real.hh | 1 + lily/tie.cc | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) 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)) -- 2.39.5