From 28899a642b98e2bba77a172be83a6cc487c56759 Mon Sep 17 00:00:00 2001 From: Marco Trevisan Date: Tue, 24 Jan 2017 11:45:10 +0100 Subject: [PATCH] main-window-linux: unref tray Indicator and Unity Launcher Entry (#2661) Signed-off-by: Marco Trevisan (github: 3v1n0) --- .../SourceFiles/platform/linux/main_window_linux.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 46ae3041d..e0ed58639 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -595,6 +595,16 @@ MainWindow::~MainWindow() { Libs::g_object_unref(_trayMenu); _trayMenu = nullptr; } + if (_trayIndicator) { + Libs::g_object_unref(_trayIndicator); + _trayIndicator = nullptr; + } +#ifndef TDESKTOP_DISABLE_UNITY_INTEGRATION + if (_psUnityLauncherEntry) { + Libs::g_object_unref(_psUnityLauncherEntry); + _psUnityLauncherEntry = nullptr; + } +#endif } } // namespace Platform