diff --git a/core/kdeconnectplugin.cpp b/core/kdeconnectplugin.cpp index 3f499c97c..ac83e65d9 100644 --- a/core/kdeconnectplugin.cpp +++ b/core/kdeconnectplugin.cpp @@ -51,6 +51,9 @@ KdeConnectPluginConfig* KdeConnectPlugin::config() const KdeConnectPlugin::~KdeConnectPlugin() { + if (d->mConfig) { + delete d->mConfig; + } } const Device* KdeConnectPlugin::device() diff --git a/kcmplugin/kdeconnectpluginkcm.cpp b/kcmplugin/kdeconnectpluginkcm.cpp index aa42e4e02..15c936726 100644 --- a/kcmplugin/kdeconnectpluginkcm.cpp +++ b/kcmplugin/kdeconnectpluginkcm.cpp @@ -44,7 +44,7 @@ KdeConnectPluginKcm::KdeConnectPluginKcm(QWidget* parent, const QVariantList& ar KdeConnectPluginKcm::~KdeConnectPluginKcm() { - + delete d->mConfig; } KdeConnectPluginConfig* KdeConnectPluginKcm::config() const