From b9359048d63cd9d2240fa2653eff1b06786bc941 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 8 May 2008 14:00:00 +0000 Subject: [PATCH] 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) " --- src/osgParticle/PrecipitationEffect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgParticle/PrecipitationEffect.cpp b/src/osgParticle/PrecipitationEffect.cpp index afc944aac..7fa2d0edc 100644 --- a/src/osgParticle/PrecipitationEffect.cpp +++ b/src/osgParticle/PrecipitationEffect.cpp @@ -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());