Skip to content
Snippets Groups Projects
Commit 4b17fa1a authored by François-Simon Fauteux-Chapleau's avatar François-Simon Fauteux-Chapleau
Browse files

SystemTray: fix GLib warnings when Jami shuts down

Change-Id: I52f4e52bbe5fd535b61c459fb7b6dd22ee8f2053
parent 35482fa9
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,14 @@ SystemTray::SystemTray(AppSettingsManager* settingsManager, QObject* parent)
SystemTray::~SystemTray()
{
#ifdef USE_LIBNOTIFY
// Clearing notifications to ensure that g_object_unref is called on every
// NotifyNotification object *before* we call notify_uninit. This isn't strictly
// necessary, but if we don't do it, then the destructor will call g_object_unref
// anyway, and this will happen *after* notify_uninit, which causes GLib to
// generate cryptic warnings when Jami shuts down, e.g.:
// `instance '0x5627a4e236a0' has no handler with id '309'`
pimpl_->notifications.clear();
notify_uninit();
#endif // USE_LIBNOTIFY
hide();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment