From c32a3b6aa1963ff1f7705a893df95bc85be8c1d1 Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Sat, 15 Oct 2011 02:37:11 +0000 Subject: [PATCH] Fix a memory leak in test suit player constructor --- projects/mtg/src/TestSuiteAI.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mtg/src/TestSuiteAI.cpp b/projects/mtg/src/TestSuiteAI.cpp index f4264fd7f..07ecc6dad 100644 --- a/projects/mtg/src/TestSuiteAI.cpp +++ b/projects/mtg/src/TestSuiteAI.cpp @@ -18,6 +18,7 @@ using std::string; TestSuiteAI::TestSuiteAI(GameObserver *observer, TestSuite * _suite, int playerId) : AIPlayerBaka(observer, "testsuite", "testsuite", "baka.jpg", NULL) { + SAFE_DELETE(game); //game might have been set in the parent with default values game = _suite->buildDeck(this, playerId); game->setOwner(this);