From aa70692e1a16219f2bbda8f129dd2888d1bb6341 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Sat, 27 Nov 2010 18:35:29 +0000 Subject: [PATCH] Initialize libnotify properly to prevent crashes If libnotify isn't initialized properly the app_name won't be set, causing it to eventually pass NULL for a string value to GVariant. Which nicely results in a SEGV. --- src/empathy-chat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/empathy-chat.c b/src/empathy-chat.c index ebe0a900..7d8fcd32 100644 --- a/src/empathy-chat.c +++ b/src/empathy-chat.c @@ -26,6 +26,8 @@ #include #include +#include + #include #include @@ -119,6 +121,8 @@ main (int argc, gtk_window_set_default_icon_name ("empathy"); textdomain (GETTEXT_PACKAGE); + notify_init (_(PACKAGE_NAME)); + app = gtk_application_new (EMPATHY_CHAT_DBUS_NAME, G_APPLICATION_FLAGS_NONE); g_signal_connect (app, "activate", G_CALLBACK (activate_cb), NULL); @@ -155,5 +159,7 @@ main (int argc, g_object_unref (debug_sender); #endif + notify_uninit (); + return retval; } -- 2.39.2