summaryrefslogtreecommitdiff
path: root/src/imagesprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imagesprite.cpp')
-rw-r--r--src/imagesprite.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/imagesprite.cpp b/src/imagesprite.cpp
index e0c27e3d7..803c9c24f 100644
--- a/src/imagesprite.cpp
+++ b/src/imagesprite.cpp
@@ -42,7 +42,10 @@ ImageSprite::ImageSprite(Image *image):
ImageSprite::~ImageSprite()
{
if (mImage)
+ {
mImage->decRef();
+ mImage = 0;
+ }
}
bool ImageSprite::draw(Graphics* graphics, int posX, int posY) const