Adds a sanity check in the event we don't actually have any animation frames generated.

This commit is contained in:
Areloch 2016-07-06 22:30:19 -05:00
parent 4b983cf23e
commit 59637bb1c7

View file

@ -1702,7 +1702,7 @@ void ParticleEmitter::setupBillboard( Particle *part,
lVerts->color = partCol; } \
// Here we deal with UVs for animated particle (billboard)
if (part->dataBlock->animateTexture)
if (part->dataBlock->animateTexture && !part->dataBlock->animTexFrames.empty())
{
S32 fm = (S32)(part->currentAge*(1.0/1000.0)*part->dataBlock->framesPerSec);
U8 fm_tile = part->dataBlock->animTexFrames[fm % part->dataBlock->numFrames];