mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-02 07:03:50 +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;
|
newChannels = mInputDeviceSourceMaps[i].numChannels;
|
||||||
if (oldChannels < newChannels && oldChannels >= 1)
|
if (oldChannels < newChannels && oldChannels >= 1)
|
||||||
newChannels = oldChannels;
|
newChannels = oldChannels;
|
||||||
mInputChannels->SetSelection(newChannels - 1);
|
if (newChannels >= 1)
|
||||||
|
mInputChannels->SetSelection(newChannels - 1);
|
||||||
gPrefs->Write(wxT("/AudioIO/RecordChannels"), newChannels);
|
gPrefs->Write(wxT("/AudioIO/RecordChannels"), newChannels);
|
||||||
mInputChannels->Enable(mInputChannels->GetCount() ? true : false);
|
mInputChannels->Enable(mInputChannels->GetCount() ? true : false);
|
||||||
index = i;
|
index = i;
|
||||||
|
|||||||
Reference in New Issue
Block a user