From dc970b94784e51d03ffd13b612e30a812873c9f5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 2 Dec 2002 01:10:20 +0000 Subject: [PATCH] *** empty log message *** --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40551 --- src/main/win32/SDL_main.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/win32/SDL_main.c b/src/main/win32/SDL_main.c index bfa136e40..60d80d1f5 100644 --- a/src/main/win32/SDL_main.c +++ b/src/main/win32/SDL_main.c @@ -144,20 +144,24 @@ static void __cdecl cleanup_output(void) #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