Qt: Ensure audio processor is only set if one is present in config

This commit is contained in:
Jeffrey Pfau 2015-08-16 19:56:45 -07:00
parent 6d5d11b074
commit 92d5ebf2f4
1 changed files with 3 additions and 1 deletions

View File

@ -57,7 +57,9 @@ GBAApp::GBAApp(int& argc, char* argv[])
return; return;
} }
AudioProcessor::setDriver(static_cast<AudioProcessor::Driver>(m_configController.getQtOption("audioDriver").toInt())); if (!m_configController.getQtOption("audioDriver").isNull()) {
AudioProcessor::setDriver(static_cast<AudioProcessor::Driver>(m_configController.getQtOption("audioDriver").toInt()));
}
Window* w = new Window(&m_configController); Window* w = new Window(&m_configController);
connect(w, &Window::destroyed, [this]() { connect(w, &Window::destroyed, [this]() {
m_windows[0] = nullptr; m_windows[0] = nullptr;