In line 126 (current svn) in CParticleAnimatedMeshSceneNodeEmitter.cpp it can happen that a meshbuffer has no vertices (for example it's only used for a material). It will then crash because of doing modulo 0. Setting vertexNumber on 0 will also not help (it would crash a few lines later). So either we try to find a better meshbuffer in this case or we simply continue. I've done the latter here to avoid the crashes.
So instead of:
Code: Select all
u32 vertexNumber = os::Randomizer::rand() % frameMesh->getMeshBuffer(randomMB)->getVertexCount();
it would be:
Code: Select all
u32 vertexCount = frameMesh->getMeshBuffer(randomMB)->getVertexCount();
if ( !vertexCount )
continue;
u32 vertexNumber = os::Randomizer::rand() % vertexCount;