diff options
author | Gilad Arnold <garnold@google.com> | 2015-08-31 12:26:13 -0700 |
---|---|---|
committer | Gilad Arnold <garnold@google.com> | 2015-08-31 12:40:52 -0700 |
commit | e779a4ea234801eb279f378b6999705f10cd5abc (patch) | |
tree | c487959067722ceff4afed752fab7b84ebd4b568 | |
parent | b470cc18ef58c7c6d7e99f80559a69f65f5167e3 (diff) | |
download | tlsdate-e779a4ea234801eb279f378b6999705f10cd5abc.tar.gz |
Check whether DBus is initialized before attempting platform init.
Otherwise, we segfault.
Bug: 22373707
Change-Id: I94601696055e5f649334f470f4827f92614ff74a
-rw-r--r-- | src/platform-cros.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/platform-cros.c b/src/platform-cros.c index c382c0d..9341750 100644 --- a/src/platform-cros.c +++ b/src/platform-cros.c @@ -533,6 +533,11 @@ platform_init_cros (struct state *state) /* Watch for per-service ProxyConfig property changes */ struct event_base *base = state->base; struct dbus_state *dbus_state = state->dbus; + if (!dbus_state) + { + info ("[cros] DBus not connected, skipping platform initialization."); + return 0; + } struct source *src = NULL; int sources = 0; DBusConnection *conn = dbus_state->conn; |