mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
DolphinQt2: Fix memory leak in GameLoader::LoadGame
This commit is contained in:
parent
a6be1513bf
commit
09832caf41
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user