diff --git a/Source/Core/DolphinQt/ResourcePackManager.cpp b/Source/Core/DolphinQt/ResourcePackManager.cpp index 90739da45f..221a752f57 100644 --- a/Source/Core/DolphinQt/ResourcePackManager.cpp +++ b/Source/Core/DolphinQt/ResourcePackManager.cpp @@ -3,6 +3,8 @@ #include "DolphinQt/ResourcePackManager.h" +#include + #include #include #include @@ -243,8 +245,10 @@ void ResourcePackManager::Remove() if (box.exec() != QMessageBox::Yes) return; + const std::string selected_pack_path = + ResourcePack::GetPacks()[GetResourcePackIndex(items[0])].GetPath(); Uninstall(); - File::Delete(ResourcePack::GetPacks()[GetResourcePackIndex(items[0])].GetPath()); + File::Delete(selected_pack_path); RepopulateTable(); }