mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-22 13:53:20 +08:00
MAVLink: Use valid flag to initialize fields
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user