diff --git a/libraries/AP_Gripper/AP_Gripper.cpp b/libraries/AP_Gripper/AP_Gripper.cpp index 0cabe2c3f6..1fbd9e197a 100644 --- a/libraries/AP_Gripper/AP_Gripper.cpp +++ b/libraries/AP_Gripper/AP_Gripper.cpp @@ -168,9 +168,9 @@ PASS_TO_BACKEND(grabbed) namespace AP { -AP_Gripper *gripper() +AP_Gripper &gripper() { - return AP_Gripper::get_singleton(); + return *AP_Gripper::get_singleton(); } }; diff --git a/libraries/AP_Gripper/AP_Gripper.h b/libraries/AP_Gripper/AP_Gripper.h index 3d412a191a..f024b7c0be 100644 --- a/libraries/AP_Gripper/AP_Gripper.h +++ b/libraries/AP_Gripper/AP_Gripper.h @@ -88,7 +88,7 @@ private: }; namespace AP { - AP_Gripper *gripper(); + AP_Gripper &gripper(); }; #endif // AP_GRIPPER_ENABLED