From 65285356dbcab256e48b3c4d928701893097a701 Mon Sep 17 00:00:00 2001 From: Yiyang Fei Date: Tue, 26 Apr 2016 14:44:47 -0700 Subject: [PATCH] Fix segfault crash. --- test/spawn-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/spawn-test.c b/test/spawn-test.c index 723a488..08f7cac 100644 --- a/test/spawn-test.c +++ b/test/spawn-test.c @@ -17,6 +17,7 @@ main (int argc, char **argv) char **argv_copy; int i; DBusError error; + DBusBabysitter *sitter; if (argc < 2) { @@ -30,7 +31,7 @@ main (int argc, char **argv) argv_copy [i] = argv[i + 1]; argv_copy[argc - 1] = NULL; - if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy[0], argv_copy, NULL, setup_func, NULL, &error)) + if (!_dbus_spawn_async_with_babysitter (&sitter, argv_copy[0], argv_copy, NULL, setup_func, NULL, &error)) { fprintf (stderr, "Could not launch application: \"%s\"\n", error.message); -- 2.5.4 (Apple Git-61)