diff --git a/src/widget/systemtrayicon.cpp b/src/widget/systemtrayicon.cpp index a7f3ef183..32812fb2d 100644 --- a/src/widget/systemtrayicon.cpp +++ b/src/widget/systemtrayicon.cpp @@ -99,6 +99,19 @@ SystemTrayIcon::SystemTrayIcon() SystemTrayIcon::~SystemTrayIcon() { + delete qtIcon; +#ifdef ENABLE_SYSTRAY_UNITY_BACKEND + delete unityIndicator; + delete unityMenu; +#endif +#ifdef ENABLE_SYSTRAY_STATUSNOTIFIER_BACKEND + delete statusNotifier; + delete snMenu; +#endif +#ifdef ENABLE_SYSTRAY_GTK_BACKEND + delete gtkIcon; + delete gtkMenu; +#endif qDebug() << "Deleting SystemTrayIcon"; } diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 85ddce169..bb829f797 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -482,7 +482,10 @@ Widget::~Widget() Translator::unregister(this); AutoUpdater::abortUpdates(); if (icon) + { icon->hide(); + delete icon; + } delete profileForm; delete settingsWidget;