Guard sound manager initialization with "enable_sound" (#7167)

This commit is contained in:
nOOb3167 2018-03-26 17:44:40 +02:00 committed by SmallJoker
parent 9802e59724
commit b0fef16a27

@ -137,7 +137,8 @@ GUIEngine::GUIEngine(JoystickController *joystick,
//create soundmanager
MenuMusicFetcher soundfetcher;
#if USE_SOUND
m_sound_manager = createOpenALSoundManager(g_sound_manager_singleton.get(), &soundfetcher);
if (g_settings->getBool("enable_sound"))
m_sound_manager = createOpenALSoundManager(g_sound_manager_singleton.get(), &soundfetcher);
#endif
if(!m_sound_manager)
m_sound_manager = &dummySoundManager;