summaryrefslogtreecommitdiff
path: root/src/net
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/net
parent2b2948138292432e0a88e0fe6790e8afd25a5871 (diff)
downloadplus-90982a892d9820663bde5f62ccc333841a547d69.tar.gz
plus-90982a892d9820663bde5f62ccc333841a547d69.tar.bz2
plus-90982a892d9820663bde5f62ccc333841a547d69.tar.xz
plus-90982a892d9820663bde5f62ccc333841a547d69.zip
Fix memory leaks in npchandler and npcdialog classes.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tmwa/npchandler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/tmwa/npchandler.cpp b/src/net/tmwa/npchandler.cpp
index 688635942..eb347db44 100644
--- a/src/net/tmwa/npchandler.cpp
+++ b/src/net/tmwa/npchandler.cpp
@@ -258,6 +258,13 @@ void NpcHandler::endShopping(int beingId _UNUSED_)
void NpcHandler::clearDialogs()
{
+ NpcDialogs::iterator it = mNpcDialogs.begin();
+ NpcDialogs::iterator it_end = mNpcDialogs.end();
+ while (it != it_end)
+ {
+ delete (*it).second.dialog;
+ ++ it;
+ }
mNpcDialogs.clear();
}