changeset 550:0ac20b67c2c7

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Mon, 02 Dec 2002 01:10:20 +0000
parents c4471fe94881
children b0c5a13a4243
files src/main/win32/SDL_main.c
diffstat 1 files changed, 16 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/win32/SDL_main.c	Sun Nov 24 20:44:08 2002 +0000
+++ b/src/main/win32/SDL_main.c	Mon Dec 02 01:10:20 2002 +0000
@@ -144,20 +144,24 @@
 
 #ifndef NO_STDIO_REDIRECT
 	/* See if the files have any output in them */
-	file = fopen(stdoutPath, "rb");
-	if ( file ) {
-		empty = (fgetc(file) == EOF) ? 1 : 0;
-		fclose(file);
-		if ( empty ) {
-			remove(stdoutPath);
+	if ( stdoutPath[0] ) {
+		file = fopen(stdoutPath, "rb");
+		if ( file ) {
+			empty = (fgetc(file) == EOF) ? 1 : 0;
+			fclose(file);
+			if ( empty ) {
+				remove(stdoutPath);
+			}
 		}
 	}
-	file = fopen(stderrPath, "rb");
-	if ( file ) {
-		empty = (fgetc(file) == EOF) ? 1 : 0;
-		fclose(file);
-		if ( empty ) {
-			remove(stderrPath);
+	if ( stderrPath[0] ) {
+		file = fopen(stderrPath, "rb");
+		if ( file ) {
+			empty = (fgetc(file) == EOF) ? 1 : 0;
+			fclose(file);
+			if ( empty ) {
+				remove(stderrPath);
+			}
 		}
 	}
 #endif