summaryrefslogtreecommitdiff
path: root/src/gui/playerbox.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-11 16:15:10 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-11 16:15:10 +0000
commitcaeba363798727f75972ce6b8625fd9754bee903 (patch)
tree619fbff5801278d5b4f98413e354ea73a87f34bc /src/gui/playerbox.cpp
parent24bf86763cdba47e9a88124a3394882667169185 (diff)
downloadmana-client-caeba363798727f75972ce6b8625fd9754bee903.tar.gz
mana-client-caeba363798727f75972ce6b8625fd9754bee903.tar.bz2
mana-client-caeba363798727f75972ce6b8625fd9754bee903.tar.xz
mana-client-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.cpp4
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);
+ }
}
}