DolphinQt2: Fix memory leak in GameLoader::LoadGame

This commit is contained in:
JosJuice 2017-06-12 15:21:08 +02:00
parent a6be1513bf
commit 09832caf41

View File

@ -143,8 +143,8 @@ void GameLoader::LoadGame(const QString& path)
{
if (!DiscIO::ShouldHideFromGameList(path.toStdString()))
{
GameFile* game = new GameFile(path);
auto game = QSharedPointer<GameFile>::create(path);
if (game->IsValid())
emit GameLoaded(QSharedPointer<GameFile>(game));
emit GameLoaded(game);
}
}