- fix division by 0.

SVN r2243 (trunk)
This commit is contained in:
Christoph Oelckers 2010-03-25 23:29:41 +00:00
parent 0f0c02f9d6
commit a6a303f438

View file

@ -1737,7 +1737,7 @@ bool FMODSoundRenderer::HandleChannelDelay(FMOD::Channel *chan, FISoundChannel *
if (FMOD_OK == chan->getCurrentSound(&sound))
{
unsigned int len;
if (FMOD_OK == sound->getLength(&len, FMOD_TIMEUNIT_MS))
if (FMOD_OK == sound->getLength(&len, FMOD_TIMEUNIT_MS) && len)
{
difftime %= len;
}