1
0
Fork 0

Fix for reposition crash for some users

Speculative fix for a reposition assert which Huntley is seeing:
  https://sourceforge.net/p/flightgear/codetickets/2229/

Unclear why it’s not happening for me other some other folks, but this
should logically be the correct fix. Let’s find out.
This commit is contained in:
James Turner 2020-05-07 11:07:47 +01:00
parent 522c742419
commit bf72e1d729

View file

@ -106,7 +106,12 @@ void FGXMLAutopilotGroupImplementation::reinit()
{
SGSubsystemGroup::unbind();
clearSubsystems();
// ensure we bind again, so the SGSubsystemGroup state is correct before
// we call init. Since there's no actual group members at this point (we
// cleared them just above) this is purely to ensure SGSubsystemGroup::_state
// is BIND, so that ::init doesn't assert
SGSubsystemGroup::bind();
init();
}