summaryrefslogtreecommitdiff
path: root/src/imageparticle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imageparticle.cpp')
-rw-r--r--src/imageparticle.cpp6
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