diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-05 19:06:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-05 19:06:22 +0300 |
commit | efaca0ed86f119a107bb9c0459f4334aa66d1e47 (patch) | |
tree | 07b983fb997958650b669e690d9e62a4ff270ab2 /src/gui/equipmentwindow.cpp | |
parent | 93aa9c81a2043c6caecd8437bfecbfa0c9b79436 (diff) | |
download | plus-efaca0ed86f119a107bb9c0459f4334aa66d1e47.tar.gz plus-efaca0ed86f119a107bb9c0459f4334aa66d1e47.tar.bz2 plus-efaca0ed86f119a107bb9c0459f4334aa66d1e47.tar.xz plus-efaca0ed86f119a107bb9c0459f4334aa66d1e47.zip |
Fix some leaks in being class.
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r-- | src/gui/equipmentwindow.cpp | 6 |
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; } |