From bcc79996c4c254a528e7b00f260d8ebd09e2a820 Mon Sep 17 00:00:00 2001 From: "M. Kristall" Date: Sat, 3 Oct 2009 11:37:03 +0000 Subject: * (bug 3554) Fix a few more places where opened files might not be closed --- src/ui/ui_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 4dffbd96..11971f2a 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -2940,12 +2940,13 @@ static void UI_RunMenuScript( char **args ) { trap_FS_Read( text, len, f ); text[ len ] = 0; - trap_FS_FCloseFile( f ); Com_sprintf( command, 32, "ptrcrestore %s", text ); trap_Cmd_ExecuteText( EXEC_APPEND, command ); } + if( len > -1 ) + trap_FS_FCloseFile( f ); } else if( Q_stricmp( name, "Say" ) == 0 ) { -- cgit