From: Yiyang Fei Date: Wed, 27 Apr 2016 15:10:06 +0000 (-0700) Subject: Fix crash in test-spawn unit test app on Windows. X-Git-Tag: dbus-1.10.10~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdf9fd02d22e81b92046f42d52db01b5a1bd79c7;p=thirdparty%2Fdbus.git Fix crash in test-spawn unit test app on Windows. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=95160 Reviewed-by: Simon McVittie --- diff --git a/dbus/dbus-spawn-win.c b/dbus/dbus-spawn-win.c index c58bf3cd3..804aa4269 100644 --- a/dbus/dbus-spawn-win.c +++ b/dbus/dbus-spawn-win.c @@ -659,7 +659,8 @@ _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, _DBUS_ASSERT_ERROR_IS_CLEAR (error); _dbus_assert (argv[0] != NULL); - *sitter_p = NULL; + if (sitter_p != NULL) + *sitter_p = NULL; PING(); sitter = _dbus_babysitter_new ();