uORB advertise through uORBDeviceMaster directly

This commit is contained in:
Daniel Agar
2018-09-16 22:43:32 -04:00
committed by Beat Küng
parent ad88ef14e1
commit cfac2cc38e
7 changed files with 118 additions and 174 deletions
+2 -2
View File
@@ -397,8 +397,8 @@ uORB::DeviceNode::publish(const orb_metadata *meta, orb_advert_t handle, const v
uORB::DeviceNode *devnode = (uORB::DeviceNode *)handle;
int ret;
/* check if the device handle is initialized */
if ((devnode == nullptr) || (meta == nullptr)) {
/* check if the device handle is initialized and data is valid */
if ((devnode == nullptr) || (meta == nullptr) || (data == nullptr)) {
errno = EFAULT;
return PX4_ERROR;
}