1
0
Fork 0

src/GUI/Highlight.cxx: fixed bug in FdmInitialisedListener destructor.

Use m_fdm_initialised to unregister our listener, as it waill always be valid,
unlike globals->get_props()->getNode(...).
This commit is contained in:
Julian Smith 2022-02-02 14:06:44 +00:00
parent f2d05e33e3
commit da7434f2e2

View file

@ -347,7 +347,7 @@ struct FdmInitialisedListener : SGPropertyChangeListener
}
~FdmInitialisedListener()
{
globals->get_props()->getNode("sim/fdm-initialized")->removeChangeListener(this);
m_fdm_initialised->removeChangeListener(this);
}
SGPropertyNode_ptr m_fdm_initialised;
};