From efaca0ed86f119a107bb9c0459f4334aa66d1e47 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 5 Jun 2011 19:06:22 +0300 Subject: Fix some leaks in being class. --- src/gui/equipmentwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/equipmentwindow.cpp') 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; } -- cgit v1.2.3-70-g09d2