mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-06 14:52:34 +02:00
Fix assertion in MIDI prefs when there are no devices
This commit is contained in:
parent
8928bd4d7b
commit
a1b88fe8d6
@ -175,8 +175,10 @@ void MidiIOPrefs::PopulateOrExchange( ShuttleGui & S ) {
|
|||||||
|
|
||||||
void MidiIOPrefs::OnHost(wxCommandEvent & e)
|
void MidiIOPrefs::OnHost(wxCommandEvent & e)
|
||||||
{
|
{
|
||||||
|
wxString itemAtIndex;
|
||||||
int index = mHost->GetCurrentSelection();
|
int index = mHost->GetCurrentSelection();
|
||||||
wxString itemAtIndex = mHostNames.Item(index);
|
if (index >= 0 && index < mHostNames.Count())
|
||||||
|
itemAtIndex = mHostNames.Item(index);
|
||||||
int nDevices = Pm_CountDevices();
|
int nDevices = Pm_CountDevices();
|
||||||
|
|
||||||
if (nDevices == 0) {
|
if (nDevices == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user