From f66d7a95400c8b9e9d4013b8636852cd3f530088 Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Wed, 7 Apr 2021 20:17:27 +0100 Subject: [PATCH] Fix segfault when turning the console before the game is launched (thus audio backend not yet initialised). --- src/client/sound/openal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/sound/openal.c b/src/client/sound/openal.c index 527fe2cc..fadb36a5 100644 --- a/src/client/sound/openal.c +++ b/src/client/sound/openal.c @@ -70,6 +70,10 @@ AL_StreamDie(void) { int numBuffers; + /* openal might not be initialised yet */ + if (!qalSourceStop) + return; + streamPlaying = false; qalSourceStop(streamSource);