From Raymond de Vries, "This fix tests the right variable before it is allocated. Fortunately, until now it tested another variable (_particleSizeUniform, which is, at that moment, not allocated as well) and everything went ok. So it does not fix a crash or so, it is a matter of correct code.

Line 353 is changed from

if (!_particleSizeUniform)

to

if (!_particleColorUniform)
"
This commit is contained in:
Robert Osfield 2008-05-08 14:00:00 +00:00
parent 6d61e554b4
commit b9359048d6

View File

@ -350,7 +350,7 @@ void PrecipitationEffect::update()
}
else _inversePeriodUniform->set(1.0f/_period);
if (!_particleSizeUniform)
if (!_particleColorUniform)
{
_particleColorUniform = new osg::Uniform("particleColour", _particleColor);
_stateset->addUniform(_particleColorUniform.get());