aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ModFolderModel.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-28 02:15:39 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-28 02:15:39 -0700
commita04a6f1e0d0d551506a86964c51e5ce6af5587b4 (patch)
tree8dac30aa1cb3f188a4a0dce5b734c5937068488a /launcher/minecraft/mod/ModFolderModel.cpp
parent37420405c7b5dddb003533e1487ba45a2da5b808 (diff)
downloadPrismLauncher-a04a6f1e0d0d551506a86964c51e5ce6af5587b4.tar.gz
PrismLauncher-a04a6f1e0d0d551506a86964c51e5ce6af5587b4.tar.bz2
PrismLauncher-a04a6f1e0d0d551506a86964c51e5ce6af5587b4.zip
fix(memory leak): don't give shared pointers out to foldermodels (causes cyclic refrence)
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/ModFolderModel.cpp')
-rw-r--r--launcher/minecraft/mod/ModFolderModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/minecraft/mod/ModFolderModel.cpp b/launcher/minecraft/mod/ModFolderModel.cpp
index 6ae25d33..5e3b31e0 100644
--- a/launcher/minecraft/mod/ModFolderModel.cpp
+++ b/launcher/minecraft/mod/ModFolderModel.cpp
@@ -54,7 +54,7 @@
#include "minecraft/mod/tasks/ModFolderLoadTask.h"
#include "modplatform/ModIndex.h"
-ModFolderModel::ModFolderModel(const QString& dir, std::shared_ptr<const BaseInstance> instance, bool is_indexed, bool create_dir)
+ModFolderModel::ModFolderModel(const QString& dir, BaseInstance* instance, bool is_indexed, bool create_dir)
: ResourceFolderModel(QDir(dir), instance, nullptr, create_dir), m_is_indexed(is_indexed)
{
m_column_sort_keys = { SortType::ENABLED, SortType::NAME, SortType::VERSION, SortType::DATE, SortType::PROVIDER };