Skip to content

Commit

Permalink
Fix assertion when selected RtMidi API is not present in available AP…
Browse files Browse the repository at this point in the history
…Is (#670)
  • Loading branch information
gvnnz committed Dec 3, 2023
1 parent 8bd0b2e commit 5f5de07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/elems/config/tabMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ void geTabMidi::rebuild(const c::config::MidiData& data)
m_system->clear();
for (const auto& [key, value] : m_data.apis)
m_system->addItem(value.c_str(), key);
m_system->showItem(m_data.api);
if (m_system->hasItem(m_data.api)) // Selected API might not be present in available APIs
m_system->showItem(m_data.api);

m_portOut->rebuild(m_data.outPorts);
if (m_data.outPort == -1)
Expand Down

0 comments on commit 5f5de07

Please sign in to comment.