From: Mike Solomon Date: Tue, 18 Oct 2011 08:51:07 +0000 (+0200) Subject: Prevents division by 0 in Bar_line::calc_bar_extent. X-Git-Tag: release/2.15.15-1~35 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d6bc972f8a6492ac5b94ffea17823a865e31b21a;p=lilypond.git Prevents division by 0 in Bar_line::calc_bar_extent. --- 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); }