Skip to content

Commit

Permalink
Validate audio/MIDI backend when opening setup dialog
Browse files Browse the repository at this point in the history
Original work: LMMS#4372 by @justnope
  • Loading branch information
PhysSong committed Sep 13, 2018
1 parent b74c783 commit 98c0492
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/SetupDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :
// If no preferred audio device is saved, save the current one
QString audioDevName =
ConfigManager::inst()->value( "mixer", "audiodev" );
if( audioDevName.length() == 0 )
if( m_audioInterfaces->findText(audioDevName) < 0 )
{
audioDevName = Engine::mixer()->audioDevName();
ConfigManager::inst()->setValue(
Expand Down Expand Up @@ -936,7 +936,7 @@ SetupDialog::SetupDialog( ConfigTabs _tab_to_open ) :

QString midiDevName =
ConfigManager::inst()->value( "mixer", "mididev" );
if( midiDevName.length() == 0 )
if( m_midiInterfaces->findText(midiDevName) < 0 )
{
midiDevName = Engine::mixer()->midiClientName();
ConfigManager::inst()->setValue(
Expand Down

0 comments on commit 98c0492

Please sign in to comment.