Fix a memory leak in test suit player constructor

This commit is contained in:
wagic.the.homebrew
2011-10-15 02:37:11 +00:00
parent 101f2d9ece
commit c32a3b6aa1

View File

@@ -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);