diff --git a/src/GUI/FGPUIDialog.cxx b/src/GUI/FGPUIDialog.cxx index 1545ef0b0..f99119679 100644 --- a/src/GUI/FGPUIDialog.cxx +++ b/src/GUI/FGPUIDialog.cxx @@ -1077,9 +1077,9 @@ FGPUIDialog::makeObject (SGPropertyNode *props, int parentWidth, int parentHeigh LogList* obj = new LogList(x, y, width, height, 20); string logClass = props->getStringValue("logclass"); if (logClass == "terrasync") { - simgear::SGTerraSync* tsync = (simgear::SGTerraSync*) globals->get_subsystem("terrasync"); - if (tsync) { - obj->setBuffer(tsync->log()); + auto tsync = globals->get_subsystem(); + if (tsync) { + obj->setBuffer(tsync->log()); } } else { FGNasalSys* nasal = (FGNasalSys*) globals->get_subsystem("nasal");