diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-16 14:28:45 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-16 14:28:45 +0200 |
commit | 59dc0bffc0f754de8daed29bce3a48e90ea6b4fb (patch) | |
tree | 7cd423679a60e25b29318d7a87f367729f8d5fdf /src/resources/imageset.cpp | |
parent | fbf665912933d10d9132b17802949149d9094fdd (diff) | |
download | mv-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.gz mv-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.bz2 mv-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.tar.xz mv-59dc0bffc0f754de8daed29bce3a48e90ea6b4fb.zip |
Add checks and fix some code style.
Diffstat (limited to 'src/resources/imageset.cpp')
-rw-r--r-- | src/resources/imageset.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/imageset.cpp b/src/resources/imageset.cpp index d1fceea69..33a66cd11 100644 --- a/src/resources/imageset.cpp +++ b/src/resources/imageset.cpp @@ -53,7 +53,7 @@ ImageSet::~ImageSet() Image* ImageSet::get(size_type i) const { - if (i >= mImages.size()) + if (i >= mImages.size() || i < 0) { logger->log("Warning: No sprite %d in this image set", (int) i); return NULL; |