[geany/geany] 029d78: Don't try to set std_out and std_err if they are NULL

Enrico Troeger git-noreply at xxxxx
Sun Apr 14 11:22:41 UTC 2013

Branch:      refs/heads/master
Author:      Enrico Troeger <enrico.troeger at uvena.de>
Committer:   Enrico Troeger <enrico.troeger at uvena.de>
Date:        Sun, 14 Apr 2013 11:22:41 UTC
Commit:      029d78536cb2bb8c56abf53e9b261610e4d13ffe

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

Modified Paths:

Modified: src/win32.c
6 files changed, 4 insertions(+), 2 deletions(-)
@@ -1067,8 +1067,10 @@ gboolean win32_spawn(const gchar *dir, gchar **argv, gchar **env, GSpawnFlags fl
 	fail = ret == -1 && errno;
 	if (!fail)
-		g_file_get_contents(tmp_file, std_out, NULL, NULL);
-		g_file_get_contents(tmp_errfile, std_err, NULL, NULL);
+		if (std_out != 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);
 	else if (error)
 		g_set_error_literal(error, G_SPAWN_ERROR, errno, g_strerror(errno));

This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).

More information about the Commits mailing list