mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-01 14:43:48 +01:00
DeviceToolBar.cpp: fix possible index out of bounds case
This commit is contained in:
@@ -701,7 +701,8 @@ void DeviceToolBar::FillInputChannels()
|
||||
newChannels = mInputDeviceSourceMaps[i].numChannels;
|
||||
if (oldChannels < newChannels && oldChannels >= 1)
|
||||
newChannels = oldChannels;
|
||||
mInputChannels->SetSelection(newChannels - 1);
|
||||
if (newChannels >= 1)
|
||||
mInputChannels->SetSelection(newChannels - 1);
|
||||
gPrefs->Write(wxT("/AudioIO/RecordChannels"), newChannels);
|
||||
mInputChannels->Enable(mInputChannels->GetCount() ? true : false);
|
||||
index = i;
|
||||
|
||||
Reference in New Issue
Block a user