MAVLink: Use valid flag to initialize fields

This commit is contained in:
Lorenz Meier
2016-05-15 15:38:01 +02:00
parent 7633797190
commit 55c879a0ab
2 changed files with 12 additions and 13 deletions
@@ -86,7 +86,7 @@ MavlinkOrbSubscription::update(uint64_t *time, void* data)
}
if (orb_copy(_topic, _fd, data)) {
if (data) {
if (data != nullptr) {
/* error copying topic data */
memset(data, 0, _topic->o_size);
}