diff --git a/src/widget/systemtrayicon.cpp b/src/widget/systemtrayicon.cpp index f9df37445..3a02c4acd 100644 --- a/src/widget/systemtrayicon.cpp +++ b/src/widget/systemtrayicon.cpp @@ -100,6 +100,7 @@ SystemTrayIcon::SystemTrayIcon() SystemTrayIcon::~SystemTrayIcon() { qDebug() << "Deleting SystemTrayIcon"; + delete qtIcon; } QString SystemTrayIcon::extractIconToFile(QIcon icon, QString name) diff --git a/src/widget/systemtrayicon.h b/src/widget/systemtrayicon.h index 48c151fb5..69d06e440 100644 --- a/src/widget/systemtrayicon.h +++ b/src/widget/systemtrayicon.h @@ -47,7 +47,7 @@ private: private: SystrayBackendType backendType; - QSystemTrayIcon* qtIcon; + QSystemTrayIcon* qtIcon = nullptr; #ifdef ENABLE_SYSTRAY_UNITY_BACKEND AppIndicator *unityIndicator;