telepathy-mission-control: server: exit early if we failed to create McdService
George Kiagiadakis
gkiagia at kemper.freedesktop.org
Sat Jan 28 11:43:23 UTC 2017
Module: telepathy-mission-control
Branch: master
Commit: 3d3a13c561e858853af5c601373be3ea0746f58c
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=3d3a13c561e858853af5c601373be3ea0746f58c
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Thu Aug 28 14:19:30 2014 +0200
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
---
server/mc-server.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/server/mc-server.c b/server/mc-server.c
index 6e77950..aa6c696 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);
More information about the telepathy-commits
mailing list