aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-11-28 02:35:29 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2010-11-28 02:44:37 +0800
commitaa70692e1a16219f2bbda8f129dd2888d1bb6341 (patch)
tree86ef2c6074ecdc676c7738c12ef765579e885480 /src
parentf2bc65f9bd9c5d47846ff44672a5a50e365d9da7 (diff)
downloadgsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.tar
gsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.tar.gz
gsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.tar.bz2
gsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.tar.lz
gsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.tar.xz
gsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.tar.zst
gsoc2013-empathy-aa70692e1a16219f2bbda8f129dd2888d1bb6341.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/empathy-chat.c b/src/empathy-chat.c
index ebe0a9003..7d8fcd323 100644
--- a/src/empathy-chat.c
+++ b/src/empathy-chat.c
@@ -26,6 +26,8 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <libnotify/notify.h>
+
#include <telepathy-glib/debug-sender.h>
#include <libempathy/empathy-idle.h>
@@ -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;
}