diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-03 13:42:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-03 13:42:29 +0300 |
commit | 35d327a5ab3ae2a235e3e045afb321810bb2536a (patch) | |
tree | 5e66c0430d8ac96b55375bc52272399c622d2c95 /src | |
parent | c7e0ec73666bae65d49d46002d0be108b60b5e37 (diff) | |
download | manaverse-35d327a5ab3ae2a235e3e045afb321810bb2536a.tar.gz manaverse-35d327a5ab3ae2a235e3e045afb321810bb2536a.tar.bz2 manaverse-35d327a5ab3ae2a235e3e045afb321810bb2536a.tar.xz manaverse-35d327a5ab3ae2a235e3e045afb321810bb2536a.zip |
Fix memory leak in party.
Diffstat (limited to 'src')
-rw-r--r-- | src/party.cpp | 5 |
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() |