summaryrefslogtreecommitdiff
path: root/src/gui/outfitwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/outfitwindow.cpp')
-rw-r--r--src/gui/outfitwindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index c56df4ef7..f548116f6 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -544,7 +544,10 @@ void OutfitWindow::previous()
void OutfitWindow::showCurrentOutfit()
{
mCurrentLabel->setCaption(strprintf(_("Outfit: %d"), mCurrentOutfit + 1));
- mUnequipCheck->setSelected(mItemsUnequip[mCurrentOutfit]);
+ if (mCurrentOutfit < static_cast<int>(OUTFITS_COUNT))
+ mUnequipCheck->setSelected(mItemsUnequip[mCurrentOutfit]);
+ else
+ mUnequipCheck->setSelected(false);
mKeyLabel->setCaption(strprintf(_("Key: %s"),
keyName(mCurrentOutfit).c_str()));
mAwayOutfitCheck->setSelected(mAwayOutfit == mCurrentOutfit);