mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 11:26:27 +02:00
possible fix to particle server crashes
This commit is contained in:
parent
3c5cd850fc
commit
cae9bc7a0f
2 changed files with 4 additions and 2 deletions
|
@ -118,7 +118,7 @@ int ParticleServer::sendSpecialPacket(Node* node) {
|
|||
|
||||
void ParticleServer::pruneDeletedParticles() {
|
||||
ParticleTree* tree = static_cast<ParticleTree*>(_tree);
|
||||
if (tree->hasAnyDeletedParticles()) {
|
||||
if (tree && tree->hasAnyDeletedParticles()) {
|
||||
|
||||
//qDebug() << "there are some deleted particles to consider...";
|
||||
uint64_t earliestLastDeletedParticlesSent = usecTimestampNow() + 1; // in the future
|
||||
|
|
|
@ -398,7 +398,9 @@ void ParticleTree::forgetParticlesDeletedBefore(uint64_t sinceTime) {
|
|||
//qDebug() << "YES older... time/key:" << iterator.key();
|
||||
_recentlyDeletedParticleIDs.remove(iterator.key());
|
||||
}
|
||||
++iterator;
|
||||
if (iterator != _recentlyDeletedParticleIDs.constEnd()) {
|
||||
++iterator;
|
||||
}
|
||||
}
|
||||
_recentlyDeletedParticlesLock.unlock();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue