From 90982a892d9820663bde5f62ccc333841a547d69 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Jun 2011 01:14:29 +0300 Subject: Fix memory leaks in npchandler and npcdialog classes. --- src/net/tmwa/npchandler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/net') 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(); } -- cgit v1.2.3-70-g09d2