[vlc-commits] logger: don't use NULL FILE* on android
Rafaël Carré
git at videolan.org
Wed Jan 25 10:05:17 CET 2012
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Wed Jan 25 04:00:46 2012 -0500| [8d2f07b0b9716aac58d0c294371cb8147589ba19] | committer: Rafaël Carré
logger: don't use NULL FILE* on android
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d2f07b0b9716aac58d0c294371cb8147589ba19
---
modules/misc/logger.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/modules/misc/logger.c b/modules/misc/logger.c
index ad0fcc5..cd3b4fd 100644
--- a/modules/misc/logger.c
+++ b/modules/misc/logger.c
@@ -193,6 +193,7 @@ static int Open( vlc_object_t *p_this )
if( p_sys == NULL )
return VLC_ENOMEM;
+ p_sys->p_file = NULL;
msg_callback_t cb = TextPrint;
const char *filename = LOG_FILE_TEXT, *header = TEXT_HEADER;
p_sys->footer = TEXT_FOOTER;
@@ -318,6 +319,7 @@ static void Close( vlc_object_t *p_this )
closelog();
else
#endif
+ if( p_sys->p_file )
{
fputs( p_sys->footer, p_sys->p_file );
fclose( p_sys->p_file );
More information about the vlc-commits
mailing list