summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-10-19 21:14:25 +0300
committerAndrei Karas <akaras@inbox.ru>2012-10-20 13:55:42 +0300
commit71d2b482d84246b8456ea863f94a9a766d33f197 (patch)
tree761f5f4e2ba350e056f5e69015a0ae94bb9bf0e5 /src/gui
parent213a21e4c079113e5822d2cf90802d6dcb2cb232 (diff)
downloadmv-71d2b482d84246b8456ea863f94a9a766d33f197.tar.gz
mv-71d2b482d84246b8456ea863f94a9a766d33f197.tar.bz2
mv-71d2b482d84246b8456ea863f94a9a766d33f197.tar.xz
mv-71d2b482d84246b8456ea863f94a9a766d33f197.zip
Add missing check in palette class.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/palette.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h
index e165e8901..f18e4ed38 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -82,7 +82,7 @@ class Palette
*/
inline const gcn::Color &getColor(int type, int alpha = 255)
{
- if (type >= static_cast<signed>(mColors.size()))
+ if (type >= static_cast<signed>(mColors.size()) || type < 0)
{
logger->log("incorrect color request type: %d from %u",
type, static_cast<unsigned int>(mColors.size()));