-Fix issue 206 (rain of filth)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-12-13 09:33:51 +00:00
parent f7bd1dcef4
commit ee3286ff2a
10 changed files with 90 additions and 21 deletions
+4 -7
View File
@@ -125,9 +125,8 @@ ManaCost::~ManaCost(){
for (unsigned int i = 0; i < nbhybrids ; i++){
SAFE_DELETE(hybrids[i]);
}
if (!extraCostsIsCopy) {
SAFE_DELETE(extraCosts);
}
SAFE_DELETE(extraCosts);
SAFE_DELETE(kicker);
}
@@ -165,11 +164,9 @@ void ManaCost::copy(ManaCost * _manaCost){
}
nbhybrids = _manaCost->nbhybrids;
SAFE_DELETE(extraCosts);
if (_manaCost->extraCosts){
//TODO Deep copy ?
if(!extraCostsIsCopy) SAFE_DELETE(extraCosts);
extraCosts = _manaCost->extraCosts;
extraCostsIsCopy = 1;
extraCosts = _manaCost->extraCosts->clone();
}
SAFE_DELETE(kicker);