summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-25 01:14:29 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-25 01:14:29 +0300
commit90982a892d9820663bde5f62ccc333841a547d69 (patch)
tree7d8d0a1efd1ea70a5bb0148c7afa7094c1c27f87 /src/gui/npcdialog.cpp
parent2b2948138292432e0a88e0fe6790e8afd25a5871 (diff)
downloadmv-90982a892d9820663bde5f62ccc333841a547d69.tar.gz
mv-90982a892d9820663bde5f62ccc333841a547d69.tar.bz2
mv-90982a892d9820663bde5f62ccc333841a547d69.tar.xz
mv-90982a892d9820663bde5f62ccc333841a547d69.zip
Fix memory leaks in npchandler and npcdialog classes.
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index d8dc68fd1..e8ea3388f 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -139,6 +139,15 @@ NpcDialog::~NpcDialog()
{
config.removeListener("logNpcInGui", this);
+ clearLayout();
+
+ delete mTextBox;
+ mTextBox = 0;
+ delete mClearButton;
+ mClearButton = 0;
+ delete mButton;
+ mButton = 0;
+
// These might not actually be in the layout, so lets be safe
delete mScrollArea;
mScrollArea = 0;
@@ -157,6 +166,9 @@ NpcDialog::~NpcDialog()
delete mItemLinkHandler;
mItemLinkHandler = 0;
+ delete mListScrollArea;
+ mListScrollArea = 0;
+
instances.remove(this);
}