From 09832caf41319c01592bd1d3817a879022032a35 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 12 Jun 2017 15:21:08 +0200 Subject: [PATCH] DolphinQt2: Fix memory leak in GameLoader::LoadGame --- Source/Core/DolphinQt2/GameList/GameTracker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/GameList/GameTracker.cpp b/Source/Core/DolphinQt2/GameList/GameTracker.cpp index 3d541e6559..fb832512b5 100644 --- a/Source/Core/DolphinQt2/GameList/GameTracker.cpp +++ b/Source/Core/DolphinQt2/GameList/GameTracker.cpp @@ -143,8 +143,8 @@ void GameLoader::LoadGame(const QString& path) { if (!DiscIO::ShouldHideFromGameList(path.toStdString())) { - GameFile* game = new GameFile(path); + auto game = QSharedPointer::create(path); if (game->IsValid()) - emit GameLoaded(QSharedPointer(game)); + emit GameLoaded(game); } }