fixed a memleak introduced when the alternative effects were changed to activated the way they do in current, the issue was that it was returning null if it wasnt paid, however if the alternative lines contained a TC those are built WAY before we get to this point, there was no delete done if the ability returns as NULL. so the tc remains and becomes a memleak.
This commit is contained in:
@@ -1033,6 +1033,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
return parseMagicLine(s1, id, spell, card);
|
||||
}
|
||||
DebugTrace("INFO parseMagicLine: Alternative Cost was not fulfilled for " << s);
|
||||
if(tc)
|
||||
SAFE_DELETE(tc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user