diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-06-03 17:42:54 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-06-03 17:42:54 +0000 |
commit | 778ca33725a8bfac629b405f0bd26cfefaf47caf (patch) | |
tree | 0b20376964c8b60f30c2827b1790cb038740a00b /src/imageparticle.cpp | |
parent | 6276c1ff96e449e73e84977110334cd8957c31b6 (diff) | |
download | mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.tar.gz mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.tar.bz2 mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.tar.xz mana-778ca33725a8bfac629b405f0bd26cfefaf47caf.zip |
Have ParticleEmitter load a possible particle image early on and don't cause a
crash when the image can't be found.
Diffstat (limited to 'src/imageparticle.cpp')
-rw-r--r-- | src/imageparticle.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp index 410782bd..35cc21ad 100644 --- a/src/imageparticle.cpp +++ b/src/imageparticle.cpp @@ -31,6 +31,12 @@ ImageParticle::ImageParticle(Map *map, Image *image): Particle(map), mImage(image) { + mImage->incRef(); +} + +ImageParticle::~ImageParticle() +{ + mImage->decRef(); } void ImageParticle::draw(Graphics *graphics, int offsetX, int offsetY) const |