DolphinWX: Get rid of an explicit delete in OnExportSave

This commit is contained in:
Lioncash 2014-09-20 12:57:53 -04:00
parent 9f2d4ee53e
commit b92e0660ab
1 changed files with 5 additions and 8 deletions

View File

@ -973,16 +973,13 @@ void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
const GameListItem *iso = GetSelectedISO();
if (!iso)
return;
u64 title;
DiscIO::IVolume *Iso = DiscIO::CreateVolumeFromFilename(iso->GetFileName());
if (Iso)
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(iso->GetFileName()));
if (volume && volume->GetTitleID((u8*)&title))
{
if (Iso->GetTitleID((u8*)&title))
{
title = Common::swap64(title);
CWiiSaveCrypted::ExportWiiSave(title);
}
delete Iso;
title = Common::swap64(title);
CWiiSaveCrypted::ExportWiiSave(title);
}
}