- Fixed some segfaults in Test suite
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-23 10:22:54 +00:00
parent de8404df97
commit 846f3b2ffc
8 changed files with 29 additions and 19 deletions
+5 -5
View File
@@ -182,7 +182,7 @@ void MTGCardInstance::tap(){
WEvent * e = NEW WEventCardTap(this, 0, 1);
GameObserver * game = GameObserver::GetInstance();
game->receiveEvent(e);
delete e;
//delete e;
}
void MTGCardInstance::untap(){
@@ -191,7 +191,7 @@ void MTGCardInstance::untap(){
WEvent * e = NEW WEventCardTap(this, 1, 0);
GameObserver * game = GameObserver::GetInstance();
game->receiveEvent(e);
delete e;
//delete e;
}
@@ -409,7 +409,7 @@ int MTGCardInstance::setAttacker(int value){
attacker = value;
WEvent * e = NEW WEventCreatureAttacker(this,previousTarget, target);
GameObserver::GetInstance()->receiveEvent(e);
delete e;
//delete e;
return 1;
}
@@ -475,7 +475,7 @@ int MTGCardInstance::moveBlockerInRow(MTGCardInstance * blocker){
std::iter_swap(it1,it2);
WEvent* e = NEW WEventCreatureBlockerRank(blocker,*it2,this);
GameObserver::GetInstance()->receiveEvent(e);
delete(e);
//delete(e);
return 1;
}
@@ -528,7 +528,7 @@ int MTGCardInstance::setDefenser(MTGCardInstance * opponent){
}
g->blockersSorted = false;
g->receiveEvent(e);
delete e;
//delete e;
return 1;
}