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().
master
Andrew Productengine 2010-11-22 17:26:39 +02:00
parent 02701073ce
commit 44a6e5da2c
1 changed files with 4 additions and 0 deletions

View File

@ -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