diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-02 21:17:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-02 21:17:13 +0300 |
commit | 181ecd0c3bf27b47487f973fb83b988fd6ceaecf (patch) | |
tree | 4ee3de6acd80bf81d0960ac49d64f718f5019102 /src/gui/outfitwindow.cpp | |
parent | fb1709d774139b2173da6ee95770abaad23f726e (diff) | |
download | manaverse-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.tar.gz manaverse-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.tar.bz2 manaverse-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.tar.xz manaverse-181ecd0c3bf27b47487f973fb83b988fd6ceaecf.zip |
Another fixes after Coverity checks.
Diffstat (limited to 'src/gui/outfitwindow.cpp')
-rw-r--r-- | src/gui/outfitwindow.cpp | 5 |
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); |