summaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2020-05-05 08:38:18 +0200
committerGitHub <noreply@github.com>2020-05-05 08:38:18 +0200
commitf1a05d0f71d69641fd954daf68d13acad91114f1 (patch)
tree8134915502433a2ee61d4743cd718e1d0838f808 /src/client/game.cpp
parentcad5b987ad4720bd6a49d3604be9e81ea348f799 (diff)
downloadminetest-f1a05d0f71d69641fd954daf68d13acad91114f1.tar.gz
minetest-f1a05d0f71d69641fd954daf68d13acad91114f1.tar.bz2
minetest-f1a05d0f71d69641fd954daf68d13acad91114f1.zip
Fix broken client if openal cannot be opened (#9804)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index d1eb3bba2..1577a37db 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -1249,7 +1249,7 @@ bool Game::init(
bool Game::initSound()
{
#if USE_SOUND
- if (g_settings->getBool("enable_sound")) {
+ if (g_settings->getBool("enable_sound") && g_sound_manager_singleton.get()) {
infostream << "Attempting to use OpenAL audio" << std::endl;
sound = createOpenALSoundManager(g_sound_manager_singleton.get(), &soundfetcher);
if (!sound)