summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()));