From 92d5ebf2f490b52f778a752c79abdaf37022f368 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 16 Aug 2015 19:56:45 -0700 Subject: [PATCH] Qt: Ensure audio processor is only set if one is present in config --- src/platform/qt/GBAApp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/qt/GBAApp.cpp b/src/platform/qt/GBAApp.cpp index dc0399273..ed9645ec9 100644 --- a/src/platform/qt/GBAApp.cpp +++ b/src/platform/qt/GBAApp.cpp @@ -57,7 +57,9 @@ GBAApp::GBAApp(int& argc, char* argv[]) return; } - AudioProcessor::setDriver(static_cast(m_configController.getQtOption("audioDriver").toInt())); + if (!m_configController.getQtOption("audioDriver").isNull()) { + AudioProcessor::setDriver(static_cast(m_configController.getQtOption("audioDriver").toInt())); + } Window* w = new Window(&m_configController); connect(w, &Window::destroyed, [this]() { m_windows[0] = nullptr;