- if (count != SCM_EOL && to_boolean (get_property ("countPercentRepeats"))
- && check_repeat_count_visibility (context (), count))
- {
- percent_counter_ = make_spanner ("PercentRepeatCounter",
- percent_event_->self_scm ());
-
- SCM text = scm_number_to_string (count, scm_from_int (10));
- percent_counter_->set_property ("text", text);
- percent_counter_->set_bound (LEFT, col);
- Side_position_interface::add_support (percent_counter_, percent_);
- percent_counter_->set_parent (percent_, Y_AXIS);
- }
+ if (!scm_is_null (count) && to_boolean (get_property ("countPercentRepeats"))
+ && check_repeat_count_visibility (context (), count))
+ {
+ percent_counter_ = make_spanner ("PercentRepeatCounter",
+ percent_event_->self_scm ());
+
+ SCM text = scm_number_to_string (count, scm_from_int (10));
+ percent_counter_->set_property ("text", text);
+ percent_counter_->set_bound (LEFT, col);
+ Side_position_interface::add_support (percent_counter_, percent_);
+ percent_counter_->set_parent (percent_, Y_AXIS);
+ percent_counter_->set_parent (percent_, X_AXIS);
+ }