Merc NPCType memleak fix

This commit is contained in:
Michael Cook (mackal) 2015-01-27 18:16:55 -05:00
parent f17fb2a8e1
commit 62d1b0c2bd

View File

@ -4766,6 +4766,7 @@ Merc* Merc::LoadMerc(Client *c, MercTemplate* merc_template, uint32 merchant_id,
npc_type->no_target_hotkey = 1;
Merc* merc = new Merc(npc_type, c->GetX(), c->GetY(), c->GetZ(), 0);
merc->GiveNPCTypeData(npc_type); // for clean up, works a bit like pets
if(merc)
{