diff options
Diffstat (limited to 'src/gui/playerbox.cpp')
-rw-r--r-- | src/gui/playerbox.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/playerbox.cpp b/src/gui/playerbox.cpp index eca0f04f..243849e6 100644 --- a/src/gui/playerbox.cpp +++ b/src/gui/playerbox.cpp @@ -45,7 +45,9 @@ void PlayerBox::draw(gcn::Graphics *graphics) // Draw his hair int hf = hairColor + 40 * (hairStyle); - hairset->spriteset[hf]->draw(gui_bitmap, x + 37, y + 5); + if (hf >= 0 && hf < (int)hairset->spriteset.size()) { + hairset->spriteset[hf]->draw(gui_bitmap, x + 37, y + 5); + } } } |