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.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/outfitwindow.cpp b/src/gui/outfitwindow.cpp
index 502e9d96b..265932cbb 100644
--- a/src/gui/outfitwindow.cpp
+++ b/src/gui/outfitwindow.cpp
@@ -593,10 +593,11 @@ void OutfitWindow::copyFromEquiped(int dst)
for (unsigned i = 0; i < inventory->getSize(); i++)
{
- if (inventory->getItem(i) && inventory->getItem(i)->isEquipped())
+ const Item *item = inventory->getItem(i);
+ if (item && item->isEquipped())
{
- mItems[dst][outfitCell] = inventory->getItem(i)->getId();
- mItemColors[dst][outfitCell++] = inventory->getItem(i)->getColor();
+ mItems[dst][outfitCell] = item->getId();
+ mItemColors[dst][outfitCell++] = item->getColor();
if (outfitCell >= OUTFIT_ITEM_COUNT)
break;
}