diff --git a/launcher/ui/pages/modplatform/ModPage.h b/launcher/ui/pages/modplatform/ModPage.h index c3b58cd6..4ea55efa 100644 --- a/launcher/ui/pages/modplatform/ModPage.h +++ b/launcher/ui/pages/modplatform/ModPage.h @@ -41,8 +41,6 @@ class ModPage : public ResourcePage { return page; } - ~ModPage() override = default; - //: The plural version of 'mod' [[nodiscard]] inline QString resourcesString() const override { return tr("mods"); } //: The singular version of 'mods' diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp index 631ae68c..472aa851 100644 --- a/launcher/ui/pages/modplatform/ResourceModel.cpp +++ b/launcher/ui/pages/modplatform/ResourceModel.cpp @@ -230,7 +230,7 @@ void ResourceModel::clearData() void ResourceModel::runSearchJob(Task::Ptr ptr) { - m_current_search_job = ptr; + m_current_search_job.reset(ptr); // clean up first m_current_search_job->start(); } void ResourceModel::runInfoJob(Task::Ptr ptr) diff --git a/launcher/ui/pages/modplatform/ResourcePackPage.h b/launcher/ui/pages/modplatform/ResourcePackPage.h index c01c89c4..8c5cf08b 100644 --- a/launcher/ui/pages/modplatform/ResourcePackPage.h +++ b/launcher/ui/pages/modplatform/ResourcePackPage.h @@ -31,8 +31,6 @@ class ResourcePackResourcePage : public ResourcePage { return page; } - ~ResourcePackResourcePage() override = default; - //: The plural version of 'resource pack' [[nodiscard]] inline QString resourcesString() const override { return tr("resource packs"); } //: The singular version of 'resource packs' diff --git a/launcher/ui/pages/modplatform/ResourcePage.cpp b/launcher/ui/pages/modplatform/ResourcePage.cpp index bbd465bc..f75bb886 100644 --- a/launcher/ui/pages/modplatform/ResourcePage.cpp +++ b/launcher/ui/pages/modplatform/ResourcePage.cpp @@ -83,6 +83,8 @@ ResourcePage::ResourcePage(ResourceDownloadDialog* parent, BaseInstance& base_in ResourcePage::~ResourcePage() { delete m_ui; + if (m_model) + delete m_model; } void ResourcePage::retranslate() diff --git a/launcher/ui/pages/modplatform/ShaderPackPage.h b/launcher/ui/pages/modplatform/ShaderPackPage.h index 972419a8..9039c4d9 100644 --- a/launcher/ui/pages/modplatform/ShaderPackPage.h +++ b/launcher/ui/pages/modplatform/ShaderPackPage.h @@ -31,8 +31,6 @@ class ShaderPackResourcePage : public ResourcePage { return page; } - ~ShaderPackResourcePage() override = default; - //: The plural version of 'shader pack' [[nodiscard]] inline QString resourcesString() const override { return tr("shader packs"); } //: The singular version of 'shader packs'