summaryrefslogtreecommitdiff
path: root/src/particlecontainer.cpp
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-12-09 08:37:38 -0700
committerFate <fate-tmw@googlemail.com>2008-12-09 08:37:38 -0700
commitcaee40df5da03eb2db6ed8d528f1561ef9bcbd34 (patch)
tree898b2f02f0109864aff772567abb2c37d9ab5149 /src/particlecontainer.cpp
parentb8cca9c48d6ea5a2372e10bbe2a75ae95917db42 (diff)
downloadmana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.tar.gz
mana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.tar.bz2
mana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.tar.xz
mana-caee40df5da03eb2db6ed8d528f1561ef9bcbd34.zip
Status particle effects: when looking up block IDs (effect IDs for other
players), make sure to initialise if needed Status particle effects: properly delete particles after effect has worn off
Diffstat (limited to 'src/particlecontainer.cpp')
-rw-r--r--src/particlecontainer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/particlecontainer.cpp b/src/particlecontainer.cpp
index ddd99ff2..bf15f1b5 100644
--- a/src/particlecontainer.cpp
+++ b/src/particlecontainer.cpp
@@ -130,7 +130,8 @@ void ParticleVector::setLocally(int index, Particle *particle)
if (mIndexedElements.size() <= (unsigned) index)
mIndexedElements.resize(index + 1, NULL);
- particle->disableAutoDelete();
+ if (particle)
+ particle->disableAutoDelete();
mIndexedElements[index] = particle;
}