summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-05 19:06:22 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-05 19:06:22 +0300
commitefaca0ed86f119a107bb9c0459f4334aa66d1e47 (patch)
tree07b983fb997958650b669e690d9e62a4ff270ab2 /src
parent93aa9c81a2043c6caecd8437bfecbfa0c9b79436 (diff)
downloadmv-efaca0ed86f119a107bb9c0459f4334aa66d1e47.tar.gz
mv-efaca0ed86f119a107bb9c0459f4334aa66d1e47.tar.bz2
mv-efaca0ed86f119a107bb9c0459f4334aa66d1e47.tar.xz
mv-efaca0ed86f119a107bb9c0459f4334aa66d1e47.zip
Fix some leaks in being class.
Diffstat (limited to 'src')
-rw-r--r--src/gui/equipmentwindow.cpp6
-rw-r--r--src/localplayer.cpp2
2 files changed, 3 insertions, 5 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;
}
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 93c27c0e7..ea330f0c1 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -180,7 +180,6 @@ LocalPlayer::LocalPlayer(int id, int subtype):
config.addListener("attackMoving", this);
config.addListener("showJobExp", this);
setShowName(config.getBoolValue("showownname"));
- beingInfoCache.clear();
}
LocalPlayer::~LocalPlayer()
@@ -200,7 +199,6 @@ LocalPlayer::~LocalPlayer()
mAwayDialog = 0;
delete mAwayListener;
mAwayListener = 0;
- beingInfoCache.clear();
}
void LocalPlayer::logic()