r1154 - branches/unified-sdl/code/client

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Sep 3 15:29:50 EDT 2007


Author: tma
Date: 2007-09-03 15:29:49 -0400 (Mon, 03 Sep 2007)
New Revision: 1154

Modified:
   branches/unified-sdl/code/client/cl_main.c
Log:
* Don't return when the file can't be opened


Modified: branches/unified-sdl/code/client/cl_main.c
===================================================================
--- branches/unified-sdl/code/client/cl_main.c	2007-09-03 19:17:32 UTC (rev 1153)
+++ branches/unified-sdl/code/client/cl_main.c	2007-09-03 19:29:49 UTC (rev 1154)
@@ -466,20 +466,21 @@
 					numFrames = clc.timeDemoFrames - 1;
 
 				f = FS_FOpenFileWrite( cl_timedemoLog->string );
-				if( !f )
+				if( f )
 				{
+					FS_Printf( f, "# %s", buffer );
+
+					for( i = 0; i < numFrames; i++ )
+						FS_Printf( f, "%d\n", clc.timeDemoDurations[ i ] );
+
+					FS_FCloseFile( f );
+					Com_Printf( "%s written\n", cl_timedemoLog->string );
+				}
+				else
+				{
 					Com_Printf( "Couldn't open %s for writing\n",
 							cl_timedemoLog->string );
-					return;
 				}
-
-				FS_Printf( f, "# %s", buffer );
-
-				for( i = 0; i < numFrames; i++ )
-					FS_Printf( f, "%d\n", clc.timeDemoDurations[ i ] );
-
-				FS_FCloseFile( f );
-				Com_Printf( "%s written\n", cl_timedemoLog->string );
 			}
 		}
 	}




More information about the quake3-commits mailing list