diff options
author | M. Kristall <mkpdev@gmail.com> | 2009-10-03 11:37:03 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:10 +0000 |
commit | bcc79996c4c254a528e7b00f260d8ebd09e2a820 (patch) | |
tree | 12a47818547b4cd85cc2465393e0bccdf4868057 /src/ui/ui_main.c | |
parent | 6f74ece9e3d772e8934e6e8f24defbd5238cbeed (diff) |
* (bug 3554) Fix a few more places where opened files might not be closed
Diffstat (limited to 'src/ui/ui_main.c')
-rw-r--r-- | src/ui/ui_main.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) { |