Fix a memory leak in test suit player constructor
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user