mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 17:35:22 +08:00
Fix nullptr access in mixer group. This was only ever an issue on booboot and not in flight.
This commit is contained in:
committed by
Lorenz Meier
parent
6e32d0b52b
commit
dfed9a3f13
@@ -157,7 +157,14 @@ uint16_t
|
||||
MixerGroup::get_saturation_status()
|
||||
{
|
||||
Mixer *mixer = _first;
|
||||
return mixer->get_saturation_status();
|
||||
uint16_t sat = 0;
|
||||
|
||||
while (mixer != nullptr) {
|
||||
sat |= mixer->get_saturation_status();
|
||||
mixer = mixer->_next;
|
||||
}
|
||||
|
||||
return sat;
|
||||
}
|
||||
|
||||
unsigned
|
||||
@@ -166,7 +173,7 @@ MixerGroup::count()
|
||||
Mixer *mixer = _first;
|
||||
unsigned index = 0;
|
||||
|
||||
while ((mixer != nullptr)) {
|
||||
while (mixer != nullptr) {
|
||||
mixer = mixer->_next;
|
||||
index++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user