- Fix a memory leak with Sacrifice costs
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-25 13:20:27 +00:00
parent 71cc79b949
commit 3d414f74b3
3 changed files with 9 additions and 3 deletions
+1 -3
View File
@@ -12,9 +12,6 @@
#endif
ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstance * c){
#if defined (WIN32) || defined (LINUX)
char buf[4096];
#endif
ManaCost * manaCost;
if (_manaCost){
manaCost = _manaCost;
@@ -159,6 +156,7 @@ void ManaCost::copy(ManaCost * _manaCost){
if (_manaCost->extraCosts){
//TODO Deep copy ?
if(!extraCostsIsCopy) SAFE_DELETE(extraCosts);
extraCosts = _manaCost->extraCosts;
extraCostsIsCopy = 1;
}