From 5364f940173f9e4ca642c33c86a3a1d7d838b433 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 1 Feb 2018 19:46:28 +0000 Subject: [PATCH 4/5] test_try_connect_to_bus: Allow skipping the use of a DBusLoop DBusLoop isn't thread-safe, so we can't use it to test multi-threaded situations. Signed-off-by: Simon McVittie --- test/test-utils-glib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-utils-glib.c b/test/test-utils-glib.c index 48e3e807..a9bbbb26 100644 --- a/test/test-utils-glib.c +++ b/test/test-utils-glib.c @@ -346,7 +346,7 @@ test_try_connect_to_bus (TestMainContext *ctx, g_assert (dbus_bus_get_unique_name (conn) != NULL); - if (!test_connection_try_setup (ctx, conn)) + if (ctx != NULL && !test_connection_try_setup (ctx, conn)) { _DBUS_SET_OOM (&error); goto fail; -- 2.15.1