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:
omegablast2002@yahoo.com
2011-04-14 19:39:50 +00:00
parent 0a54d4cf09
commit cafeecb925

View File

@@ -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;
}