diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-08-28 14:19:30 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-08-28 14:29:54 +0200 |
commit | 3d3a13c561e858853af5c601373be3ea0746f58c (patch) | |
tree | 2285b374f3cb0b91d4e67b576ec00db1d4988f94 | |
parent | 8f5a4fb823c1334e6d845aaa0c57f0fcffa42635 (diff) | |
download | telepathy-mission-control-3d3a13c561e858853af5c601373be3ea0746f58c.tar.gz |
server: exit early if we failed to create McdService
mcd_service_new() can return NULL if we didn't manage to connect to D-Bus.
Best to handle this gracefully rather than crashing horribly.
This is the top crasher on Ubuntu btw.
https://errors.ubuntu.com/problem/7e2a5f9a379f34a347895782ae948177926a1932
-rw-r--r-- | server/mc-server.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/server/mc-server.c b/server/mc-server.c index 6e77950d..aa6c696b 100644 --- a/server/mc-server.c +++ b/server/mc-server.c @@ -174,6 +174,8 @@ main (int argc, char **argv) tp_debug_set_flags (g_getenv ("MC_TP_DEBUG")); mcd = mcd_service_new (); + if (mcd == NULL) + return 1; /* Listen for suicide notification */ g_signal_connect_after (mcd, "abort", G_CALLBACK (on_abort), mcd); |