From d01235ce2de4424b8705ffb3433a8301d920fcc6 Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Sat, 5 Dec 2015 18:13:16 +0300 Subject: [PATCH] GUI: Fix removing game from game list Fixes #1326 --- rpcs3/Gui/GameViewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rpcs3/Gui/GameViewer.cpp b/rpcs3/Gui/GameViewer.cpp index 337a44a9fb..f86d70c4db 100644 --- a/rpcs3/Gui/GameViewer.cpp +++ b/rpcs3/Gui/GameViewer.cpp @@ -269,8 +269,11 @@ void GameViewer::ConfigureGame(wxCommandEvent& WXUNUSED(event)) void GameViewer::RemoveGame(wxCommandEvent& event) { + long i = GetFirstSelected(); + if (i < 0) return; + Emu.GetVFS().Init("/"); - Emu.GetVFS().DeleteAll(m_path + "/" + this->GetItemText(event.GetId(), 6).ToStdString()); + Emu.GetVFS().DeleteAll(m_path + "/" + this->GetItemText(i, 6).ToStdString()); Emu.GetVFS().UnMountAll(); Refresh();