summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-03 13:42:29 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-03 13:42:29 +0300
commit35d327a5ab3ae2a235e3e045afb321810bb2536a (patch)
tree5e66c0430d8ac96b55375bc52272399c622d2c95 /src/party.cpp
parentc7e0ec73666bae65d49d46002d0be108b60b5e37 (diff)
downloadmv-35d327a5ab3ae2a235e3e045afb321810bb2536a.tar.gz
mv-35d327a5ab3ae2a235e3e045afb321810bb2536a.tar.bz2
mv-35d327a5ab3ae2a235e3e045afb321810bb2536a.tar.xz
mv-35d327a5ab3ae2a235e3e045afb321810bb2536a.zip
Fix memory leak in party.
Diffstat (limited to 'src/party.cpp')
-rw-r--r--src/party.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/party.cpp b/src/party.cpp
index 9f0541224..e3ea497ac 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -284,8 +284,9 @@ Party *Party::getParty(short id)
PartyMap::iterator it = parties.find(id);
if (it != parties.end())
return it->second;
-
- return new Party(id);
+ Party *party = new Party(id);
+ parties[id] = party;
+ return party;
}
void Party::sort()