mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-04 03:46:42 +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()))
|
if (!DiscIO::ShouldHideFromGameList(path.toStdString()))
|
||||||
{
|
{
|
||||||
GameFile* game = new GameFile(path);
|
auto game = QSharedPointer<GameFile>::create(path);
|
||||||
if (game->IsValid())
|
if (game->IsValid())
|
||||||
emit GameLoaded(QSharedPointer<GameFile>(game));
|
emit GameLoaded(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user