summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/palette.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/palette.h b/src/gui/palette.h
index b1111c56b..0c3c2dc87 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -78,11 +78,12 @@ class Palette
*/
inline const gcn::Color &getColor(int type, int alpha = 255)
{
-// if (type >= (signed)mColors.size())
-// {
-// logger->log("request type: %d", type);
-// logger->log("size: %ld", mColors.size());
-// }
+ if (type >= (signed)mColors.size())
+ {
+ logger->log("incorrect color request type: %d from %ld",
+ type, mColors.size());
+ type = 0;
+ }
gcn::Color* col = &mColors[type].color;
col->a = alpha;
return *col;