Merge pull request #1126 from lioncash/delete

DolphinWX: Get rid of an explicit delete in OnExportSave
This commit is contained in:
skidau 2014-09-25 13:44:21 +10:00
commit 6d064b0406
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);
}
}