X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FGUI%2FMapWidget.cxx;h=bb44327fb30d49cdd6dd842652e0ecb1af87048a;hb=846fd2169832c8938f04386139de746a06e80d4b;hp=b5237d8a039d0f91cbd0eb3d3c1e2275d6861708;hpb=3f433e2c35ef533a847138e6ae10a5cb398323d7;p=flightgear.git diff --git a/src/GUI/MapWidget.cxx b/src/GUI/MapWidget.cxx index b5237d8a0..bb44327fb 100644 --- a/src/GUI/MapWidget.cxx +++ b/src/GUI/MapWidget.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include const char* RULER_LEGEND_KEY = "ruler-legend"; @@ -1977,7 +1978,7 @@ MapWidget::DrawAIObject::DrawAIObject(SGPropertyNode* m, const SGGeod& g) : // try to access the flight-plan of the aircraft. There are several layers // of potential NULL-ness here, so we have to be defensive at each stage. std::string originICAO, destinationICAO; - FGAIManager* aiManager = static_cast(globals->get_subsystem("ai-model")); + FGAIManager* aiManager = globals->get_subsystem(); FGAIBasePtr aircraft = aiManager ? aiManager->getObjectFromProperty(model) : NULL; if (aircraft) { FGAIAircraft* p = static_cast(aircraft.get());