diff --git a/Source/effects.cpp b/Source/effects.cpp index 4962c0281..1683947b4 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -182,6 +182,8 @@ void PrivSoundInit(uint8_t bLoadMask) bool effect_is_playing(SfxID nSFX) { + if (!gbSndInited) return false; + TSFX *sfx = &sgSFX[static_cast(nSFX)]; if (sfx->pSnd != nullptr) return sfx->pSnd->isPlaying(); @@ -204,6 +206,8 @@ void PlaySFX(SfxID psfx) { psfx = RndSFX(psfx); + if (!gbSndInited) return; + PlaySfxPriv(&sgSFX[static_cast(psfx)], false, { 0, 0 }); }