Fixed segfault if system was not found Autopilot

This commit is contained in:
Tuomas Järvinen
2024-07-04 14:27:42 +03:00
parent aae3e87116
commit 5af90ac918
+1 -1
View File
@@ -78,7 +78,7 @@ bool AzDroneController::stateAutopilot(void)
if (systems.size() == 0) {
std::cerr << "No system found." << std::endl;
return 1;
return false;
}
std::optional<std::shared_ptr<System>> autopilot = mMavsdk.first_autopilot(AZ_GET_AUTOPILOT_TIMEOUT);