From 8f1aac18db92a6f75c36709fd26b173e4b5e7489 Mon Sep 17 00:00:00 2001 From: Rustom Jehangir Date: Fri, 9 Dec 2016 16:30:16 -0800 Subject: [PATCH] Check for null pointer to avoid crash. --- src/uas/UAS.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index a7c74fab3..55a2c2ee7 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -979,6 +979,10 @@ void UAS::setExternalControlSetpoint(float roll, float pitch, float yaw, float t return; } + if (!_vehicle->priorityLink()) { + return; + } + // Store the previous manual commands static float manualRollAngle = 0.0; static float manualPitchAngle = 0.0; -- 2.22.0