From 44a6e5da2c76b16bb70a93ba9952bc338dce2e89 Mon Sep 17 00:00:00 2001 From: Andrew Productengine Date: Mon, 22 Nov 2010 17:26:39 +0200 Subject: STORM-521 FIXED Made defensive fix for crash in LLAudioSource::hasPendingPreloads(). Couldn't reproduce the crash, but made defensive fix. Added check for NULL into for loop that iterates through mPreloadMap in LLAudioSource::hasPendingPreloads(). Such check is already present in similar situation in LLAudioEngine::startNextTransfer(). --- indra/llaudio/llaudioengine.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llaudio') diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index 1cc03bddb8..c9cb1cd6e7 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -1557,6 +1557,10 @@ bool LLAudioSource::hasPendingPreloads() const LLAudioData *adp = iter->second; // note: a bad UUID will forever be !hasDecodedData() // but also !hasValidData(), hence the check for hasValidData() + if (!adp) + { + continue; + } if (!adp->hasDecodedData() && adp->hasValidData()) { // This source is still waiting for a preload -- cgit v1.2.3