GrandOrgue / grandorgue

GrandOrgue software
Other
148 stars 39 forks source link

Fixed crash on a divisional coupler #1891

Closed oleg68 closed 2 months ago

oleg68 commented 2 months ago

This is the first PR related to #1787.

GO supports two types of divisionals: manual divisionals ("old style") and setter divisionals ("banked").

Processing divisional couplers was made in GOSetter::PushDivisional(). Unfortunally it supported only the first type (manual) divisionals and knew nothing about the setter divisionals. So when a setter divisional was poshed, GOSetter::PushDivisional tried to couple it with a manual divisional with the same number without checking whether it exist. It caused a crash.

This PR

Because GODivisionalSetter::SwitchDivisionalTo calls GOSetter::PushDivisional() that stops processing couplers, the divisional couplers still do not work with the setter divisionals, but they do not more cause crash.

Fix of working divisional couplers with the setter divisionals will be submitted after merging this PR.

oleg68 commented 2 months ago

@larspalo @rousseldenis could you approve this pr?