From 3c7ec0569a4fce157e608021133bdc6cac679c10 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 8 Jun 2011 15:39:25 +0300 Subject: Zero variables after calling decRef(). --- src/animatedsprite.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/animatedsprite.cpp') diff --git a/src/animatedsprite.cpp b/src/animatedsprite.cpp index 80a2014eb..215fd9ad6 100644 --- a/src/animatedsprite.cpp +++ b/src/animatedsprite.cpp @@ -72,7 +72,10 @@ AnimatedSprite *AnimatedSprite::load(const std::string &filename, int variant) AnimatedSprite::~AnimatedSprite() { if (mSprite) + { mSprite->decRef(); + mSprite = 0; + } } bool AnimatedSprite::reset() -- cgit v1.2.3-60-g2f50