diff --git a/src/osgParticle/ParticleSystem.cpp b/src/osgParticle/ParticleSystem.cpp index d10fd42d3..42cf4f053 100644 --- a/src/osgParticle/ParticleSystem.cpp +++ b/src/osgParticle/ParticleSystem.cpp @@ -211,8 +211,6 @@ void osgParticle::ParticleSystem::update(double dt, osg::NodeVisitor& nv) void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo) const { - if (_particles.size() <= 0) return; - ScopedReadLock lock(_readWriteMutex); osg::State& state = *renderInfo.getState(); @@ -221,6 +219,8 @@ void osgParticle::ParticleSystem::drawImplementation(osg::RenderInfo& renderInfo // this particle system is culled _last_frame = state.getFrameStamp()->getFrameNumber(); + if (_particles.size() <= 0) return; + // update the dirty flag of delta time, so next time a new request for delta time // will automatically cause recomputing _dirty_dt = true;