mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-30 08:24:11 +01:00
CameraStabilization: Bad memory error that Sambas caught
This commit is contained in:
parent
0f1fd8f8c1
commit
e56dbfdb24
@ -121,7 +121,8 @@ void ConfigCameraStabilizationWidget::applySettings()
|
||||
// Channel 1 is second entry, so becomes zero
|
||||
int mixerNum = selectors[i]->currentIndex() - 1;
|
||||
|
||||
if ( *mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_DISABLED &&
|
||||
if ( mixerNum >= 0 && // Short circuit in case of none
|
||||
*mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_DISABLED &&
|
||||
(*mixerTypes[mixerNum] != MixerSettings::MIXER1TYPE_CAMERAROLL + i) ) {
|
||||
// If the mixer channel already to something that isn't what we are
|
||||
// about to set it to reset to none
|
||||
|
Loading…
Reference in New Issue
Block a user