summaryrefslogtreecommitdiff
path: root/src/resources/spritedef.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-16 14:28:45 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-16 14:28:45 +0200
commit59dc0bffc0f754de8daed29bce3a48e90ea6b4fb (patch)
tree7cd423679a60e25b29318d7a87f367729f8d5fdf /src/resources/spritedef.cpp
parentfbf665912933d10d9132b17802949149d9094fdd (diff)
downloadplus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.gz
plus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.bz2
plus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.xz
plus-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.zip
Add checks and fix some code style.
Diffstat (limited to 'src/resources/spritedef.cpp')
-rw-r--r--src/resources/spritedef.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp
index 17ee32fb3..8c13c595c 100644
--- a/src/resources/spritedef.cpp
+++ b/src/resources/spritedef.cpp
@@ -319,7 +319,8 @@ SpriteDef::~SpriteDef()
for (ImageSetIterator i = mImageSets.begin();
i != mImageSets.end(); ++i)
{
- i->second->decRef();
+ if (i->second)
+ i->second->decRef();
}
}