diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2026-07-14 19:26:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-14 19:26:15 +0200 |
| commit | 37726b610d3e6596b6af505178e6bf074c949b26 (patch) | |
| tree | 3eb2473449335495eddcdb2078617d7cc9246d3d /Source | |
| parent | fee15d96ad094f3a91a1b8074f8d1a113d7d55c2 (diff) | |
| parent | a18fd2d21b82f33c5ec603d0a76e136db0e30a4c (diff) | |
Merge pull request #14723 from Dentomologist/resource_pack_manager_fix_crash_when_removing_pack
ResourcePackManager: Fix crash when removing pack and properly update list
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinQt/ResourcePackManager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/ResourcePackManager.cpp b/Source/Core/DolphinQt/ResourcePackManager.cpp index 90739da45f..c342b29bae 100644 --- a/Source/Core/DolphinQt/ResourcePackManager.cpp +++ b/Source/Core/DolphinQt/ResourcePackManager.cpp @@ -3,6 +3,8 @@ #include "DolphinQt/ResourcePackManager.h" +#include <string> + #include <QDesktopServices> #include <QDialogButtonBox> #include <QGridLayout> @@ -15,6 +17,7 @@ #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "UICommon/ResourcePack/Manager.h" +#include "UICommon/ResourcePack/ResourcePack.h" ResourcePackManager::ResourcePackManager(QWidget* widget) : QDialog(widget) { @@ -243,8 +246,12 @@ void ResourcePackManager::Remove() if (box.exec() != QMessageBox::Yes) return; + ResourcePack::ResourcePack& selected_pack = + ResourcePack::GetPacks()[GetResourcePackIndex(items[0])]; + const std::string selected_pack_path = selected_pack.GetPath(); Uninstall(); - File::Delete(ResourcePack::GetPacks()[GetResourcePackIndex(items[0])].GetPath()); + ResourcePack::Remove(selected_pack); + File::Delete(selected_pack_path); RepopulateTable(); } |
