From 69ba84e62c75d1d9d48b6de6a330bde59a880a38 Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Sat, 1 Jul 2023 19:50:20 +0200 Subject: [PATCH] CSound: Initialize all members (fixes #6795) --- src/engine/client/sound.cpp | 5 +++++ src/engine/client/sound.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp index 01298d403..b1ce3c0e1 100644 --- a/src/engine/client/sound.cpp +++ b/src/engine/client/sound.cpp @@ -275,6 +275,11 @@ static void SdlCallback(void *pUnused, Uint8 *pStream, int Len) #endif } +CSound::CSound() : + m_SoundEnabled(false), m_Device(0), m_pGraphics(nullptr), m_pStorage(nullptr) +{ +} + int CSound::Init() { m_SoundEnabled = false; diff --git a/src/engine/client/sound.h b/src/engine/client/sound.h index e8256632c..207d52df5 100644 --- a/src/engine/client/sound.h +++ b/src/engine/client/sound.h @@ -28,6 +28,7 @@ class CSound : public IEngineSound static int DecodeOpus(int SampleID, const void *pData, unsigned DataSize); public: + CSound(); int Init() override; int Update() override; void Shutdown() override;