From 96c7abe76ad911af9a13ff404ade6c8c60955e05 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 24 Feb 2008 21:31:44 +0000 Subject: [PATCH] Guard against _glib_get_installation_directory() returning NULL. In that 2008-02-24 Tor Lillqvist * glib/gspawn-win32.c: Guard against _glib_get_installation_directory() returning NULL. In that case, just use the name of the helper process executable without path. svn path=/trunk/; revision=6576 --- glib/gspawn-win32.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c index dded80718..99f391a35 100644 --- a/glib/gspawn-win32.c +++ b/glib/gspawn-win32.c @@ -592,8 +592,13 @@ do_spawn_with_pipes (gint *exit_status, helper_process = HELPER_PROCESS ".exe"; glib_top = _glib_get_installation_directory (); - helper_process = g_build_filename (glib_top, "bin", helper_process, NULL); - g_free (glib_top); + if (glib_top != NULL) + { + helper_process = g_build_filename (glib_top, "bin", helper_process, NULL); + g_free (glib_top); + } + else + helper_process = g_strdup (helper_process); new_argv[0] = helper_process;