diff options
author | Tim Angus <tim@ngus.net> | 2006-05-06 17:18:02 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2006-05-06 17:18:02 +0000 |
commit | bb7bd83aaec4504b4fb90919cccaaf4d9a7b418d (patch) | |
tree | a99058fef0dbf93af48dab4581b9f785d93e68ff /src/qcommon/common.c | |
parent | bd9d761dd958aef00218de084bae00eb9bf788a4 (diff) |
* Merged ioq3-r775
- SDL_GammaRamp stuff
- Anisotropic texture filtering
- q3testesque r_flares
- cl_guid
- Security fixes
Diffstat (limited to 'src/qcommon/common.c')
-rw-r--r-- | src/qcommon/common.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c index 5c3726ff..44174ead 100644 --- a/src/qcommon/common.c +++ b/src/qcommon/common.c @@ -181,11 +181,22 @@ void QDECL Com_Printf( const char *fmt, ... ) { newtime = localtime( &aclock ); logfile = FS_FOpenFileWrite( "qconsole.log" ); - Com_Printf( "logfile opened on %s\n", asctime( newtime ) ); - if ( com_logfile->integer > 1 ) { - // force it to not buffer so we get valid - // data even if we are crashing - FS_ForceFlush(logfile); + + if(logfile) + { + Com_Printf( "logfile opened on %s\n", asctime( newtime ) ); + + if ( com_logfile->integer > 1 ) + { + // force it to not buffer so we get valid + // data even if we are crashing + FS_ForceFlush(logfile); + } + } + else + { + Com_Printf("Opening qconsole.log failed!\n"); + Cvar_SetValue("logfile", 0); } opening_qconsole = qfalse; |