Per the conversation in r3388, adding an extra seatbelt to ensure that if an object is removed from ActionLayer, it doesn't leave a dangling pointer in mReactions. This should normally be a no-op, as the expectation is that mReactions is usually empty at this point.
This commit is contained in:
@@ -20,6 +20,7 @@ MTGAbility* ActionLayer::getAbility(int type)
|
|||||||
|
|
||||||
int ActionLayer::moveToGarbage(ActionElement * e)
|
int ActionLayer::moveToGarbage(ActionElement * e)
|
||||||
{
|
{
|
||||||
|
mReactions.erase(e);
|
||||||
int i = getIndexOf(e);
|
int i = getIndexOf(e);
|
||||||
if (i != -1)
|
if (i != -1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user