Showing the changes to interface/src/ParticleTreeRenderer.cpp (1 of 3 files). Show all
Unified · Split
| @@ -32,10 +32,11 @@ void ParticleTreeRenderer::init() { · 31 unmodified lines | |||
| 32 | 32 | ||
| 33 | void ParticleTreeRenderer::update() { | 33 | void ParticleTreeRenderer::update() { |
| 34 | if (_tree) { | 34 | if (_tree) { |
| 35 | ParticleTree* tree = (ParticleTree*)_tree; | 35 | ParticleTree* tree = static_cast<ParticleTree*>(_tree); |
| 36 | _tree->lockForWrite(); | 36 | if (tree->tryLockForWrite()) { |
| 37 | tree->update(); | 37 | tree->update(); |
| 38 | _tree->unlock(); | 38 | tree->unlock(); |
| 39 | } | ||
| 39 | } | 40 | } |
| 40 | } | 41 | } |
| 41 | 42 | ||