Don't try to set std_out and std_err if they are NULL

This commit is contained in:
Enrico Troeger 2013-04-14 13:22:41 +02:00
parent 5412a244ba
commit 029d78536c

View File

@ -1067,7 +1067,9 @@ gboolean win32_spawn(const gchar *dir, gchar **argv, gchar **env, GSpawnFlags fl
fail = ret == -1 && errno; fail = ret == -1 && errno;
if (!fail) if (!fail)
{ {
if (std_out != NULL)
g_file_get_contents(tmp_file, std_out, NULL, NULL); g_file_get_contents(tmp_file, std_out, NULL, NULL);
if (std_err != NULL)
g_file_get_contents(tmp_errfile, std_err, NULL, NULL); g_file_get_contents(tmp_errfile, std_err, NULL, NULL);
} }
else if (error) else if (error)