Fix uORB auto publication

This commit is contained in:
Lorenz Meier 2015-12-24 15:46:00 +01:00
parent d839717e4c
commit 73394acc68
1 changed files with 2 additions and 2 deletions

View File

@ -126,12 +126,12 @@ int orb_publish_auto(const struct orb_metadata *meta, orb_advert_t *handle, cons
if (*handle == nullptr) { if (*handle == nullptr) {
*handle = orb_advertise_multi(meta, data, instance, priority); *handle = orb_advertise_multi(meta, data, instance, priority);
if (handle != nullptr) { if (*handle != nullptr) {
return 0; return 0;
} }
} else { } else {
return orb_publish(meta, handle, data); return orb_publish(meta, *handle, data);
} }
return -1; return -1;