From d6bc972f8a6492ac5b94ffea17823a865e31b21a Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Tue, 18 Oct 2011 10:51:07 +0200 Subject: [PATCH] Prevents division by 0 in Bar_line::calc_bar_extent. --- lily/bar-line.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lily/bar-line.cc b/lily/bar-line.cc index e256e8fe55..a22cd053b8 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -46,9 +46,9 @@ Bar_line::calc_bar_extent (SCM smob) */ SCM bar_line_color = me->get_property ("color"); SCM staff_color = staff->get_property ("color"); - if (bar_line_color == staff_color) - result *= (1 - 0.5 * (Staff_symbol_referencer::line_thickness (me) / - Staff_symbol_referencer::staff_radius (me))); + Real radius = Staff_symbol_referencer::staff_radius (me); + if (bar_line_color == staff_color && radius) + result *= (1 - 0.5 * (Staff_symbol_referencer::line_thickness (me) / radius)); } return ly_interval2scm (result); } -- 2.39.2