summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-04 12:17:52 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2013-06-23 11:44:19 +0100
commitcbe583bce4ceec03caf9b2d67af0ea6ca3ea8818 (patch)
tree449bdb2c550788a6bc65fef9c2df7062e8cd4b1b
parentc8a6b9edd819c48148e70a52cb4b6fdd5de96d75 (diff)
downloadtelepathy-haze-cbe583bce4ceec03caf9b2d67af0ea6ca3ea8818.tar.gz
Initialize libdbus for thread-safety
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65296
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 4cd171c..0c48ac5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -28,6 +28,7 @@
#include <errno.h>
#include <signal.h>
+#include <dbus/dbus.h>
#include <glib.h>
#include <libpurple/account.h>
@@ -252,6 +253,10 @@ main(int argc,
{
int ret = 0;
+ if (!dbus_threads_init_default ())
+ g_error ("Unable to initialize libdbus for thread-safety "
+ "(out of memory?)");
+
g_set_prgname(UI_ID);
haze_debug_set_flags_from_env ();