1
0
Fork 0

src/GUI/Highlight.cxx: fixed bug in ::bind() that causes crash on startup.

We need to create sim/highlighting/enabled if it doesn't already exist.
This commit is contained in:
Julian Smith 2021-10-08 23:11:08 +01:00
parent 5536dce0fd
commit 96dee79873

View file

@ -350,7 +350,7 @@ struct FdmInitialisedListener : SGPropertyChangeListener
void Highlight::bind()
{
s_prop_enabled = globals->get_props()->getNode("sim/highlighting/enabled");
s_prop_enabled = globals->get_props()->getNode("sim/highlighting/enabled", true);
globals->get_props()->setStringValue("sim/highlighting/current", "");
globals->get_props()->setStringValue("sim/highlighting/current-ptr", "/sim/highlighting/current");