diff --git a/src/Airmap/AirMapFlightPlanManager.cc b/src/Airmap/AirMapFlightPlanManager.cc index ff763255baa82408755f84739f458e8896d362b7..e49f47b92631f784cdc70e7553c3f2df736be9d8 100644 --- a/src/Airmap/AirMapFlightPlanManager.cc +++ b/src/Airmap/AirMapFlightPlanManager.cc @@ -428,7 +428,7 @@ AirMapFlightPlanManager::_createFlightPlan() void AirMapFlightPlanManager::_updateRulesAndFeatures(std::vector& rulesets, std::unordered_map& features, bool updateFeatures) { - AirMapRulesetsManager* pRulesMgr = dynamic_cast(qgcApp()->toolbox()->airspaceManager()->ruleSets()); + auto* pRulesMgr = qobject_cast(qgcApp()->toolbox()->airspaceManager()->ruleSets()); if(pRulesMgr) { for(int rs = 0; rs < pRulesMgr->ruleSets()->count(); rs++) { AirMapRuleSet* ruleSet = qobject_cast(pRulesMgr->ruleSets()->get(rs));