From e9a2b2f49577dee2c0dbf8395722018014f45407 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Tue, 10 May 2011 14:40:54 +0000 Subject: [PATCH] added a guard against removing aloseabilities from a card which already has an active aloseabilities, we generally dont want these to remove each other...this also fixes a mem leak i created in the previous fix for an infinate loop this was creating, i left that fix in place just in case some crazy edge case would add it to a card again. --- projects/mtg/src/AllAbilities.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 089f109b3..698462046 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -2835,6 +2835,9 @@ int ALoseAbilities::addToGame() if (al->mObjects[i]) { MTGAbility * currentAction = (MTGAbility *) al->mObjects[i]; + ALoseAbilities * la = dynamic_cast (currentAction); + if(la) + continue; if (currentAction->source == _target) { storedAbilities.push_back(currentAction);