mavlink_receiver: check for allocation failure

Also remove the start() declration (there's no definition of that)
This commit is contained in:
Beat Küng
2017-05-12 11:00:29 +02:00
committed by Lorenz Meier
parent 2c548f84a7
commit 4105394234
2 changed files with 5 additions and 7 deletions

View File

@@ -2493,6 +2493,11 @@ void *MavlinkReceiver::start_helper(void *context)
MavlinkReceiver *rcv = new MavlinkReceiver((Mavlink *)context);
if (!rcv) {
PX4_ERR("alloc failed");
return nullptr;
}
void *ret = rcv->receive_thread(nullptr);
delete rcv;

View File

@@ -99,13 +99,6 @@ public:
*/
~MavlinkReceiver();
/**
* Start the mavlink task.
*
* @return OK on success.
*/
int start();
/**
* Display the mavlink status.
*/