summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/equipmentwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 92ff782ab..7cbcc658d 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -304,11 +304,11 @@ void EquipmentWindow::setBeing(Being *being)
{
mPlayerBox->setPlayer(being);
mBeing = being;
+ if (mEquipment)
+ delete mEquipment->getBackend();
+ delete mEquipment;
if (!being)
{
- if (mEquipment)
- delete mEquipment->getBackend();
- delete mEquipment;
mEquipment = 0;
return;
}