diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-11 16:15:10 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-11 16:15:10 +0000 |
commit | caeba363798727f75972ce6b8625fd9754bee903 (patch) | |
tree | 619fbff5801278d5b4f98413e354ea73a87f34bc /src/gui/playerbox.cpp | |
parent | 24bf86763cdba47e9a88124a3394882667169185 (diff) | |
download | mana-caeba363798727f75972ce6b8625fd9754bee903.tar.gz mana-caeba363798727f75972ce6b8625fd9754bee903.tar.bz2 mana-caeba363798727f75972ce6b8625fd9754bee903.tar.xz mana-caeba363798727f75972ce6b8625fd9754bee903.zip |
Implemented parent relationship for Window class and converted more ok dialogs
to the OkDialog class.
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); + } } } |