From 42df6526a234db8a24fa7192ef94dd5cb3f290a4 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Sun, 19 Oct 2025 17:59:03 +1000 Subject: [PATCH] [FIRE-35962] Fix crashes when checking for corrupt sounds --- indra/llaudio/llaudioengine.cpp | 4 ++-- indra/newview/llviewermessage.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index fa98ee2ed4..8851c34826 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -660,7 +660,7 @@ bool LLAudioEngine::preloadSound(const LLUUID &uuid) LL_DEBUGS("AudioEngine")<<"( "< Protect against corrupted sounds. Just do a quick exit instead of trying to preload over and over again. - if( gAudiop->isCorruptSound( uuid ) ) + if (gAudiop && gAudiop->isCorruptSound(uuid)) return false; // @@ -1317,7 +1317,7 @@ std::map gSoundHistory; void LLAudioSource::logSoundPlay(const LLUUID& id, LLVector3d position, S32 type, const LLUUID& assetid, const LLUUID& ownerid, const LLUUID& sourceid, bool is_trigger, bool is_looped) { // Corrupt asset, do not bother - if( gAudiop->isCorruptSound( assetid ) ) + if (gAudiop && gAudiop->isCorruptSound(assetid)) return; // diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 95e64ca158..c9d4d125a7 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4889,7 +4889,7 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data) msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id); // Protect against corrupted sounds - if (gAudiop->isCorruptSound(sound_id)) + if (gAudiop && gAudiop->isCorruptSound(sound_id)) return; // @@ -4944,7 +4944,7 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data) msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id); // Protect against corrupted sounds - if (gAudiop->isCorruptSound(sound_id)) + if (gAudiop && gAudiop->isCorruptSound(sound_id)) return; //