[base] Don't close 'stderr' after logging. * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_logging_deinit): Fix it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
diff --git a/ChangeLog b/ChangeLog
index 8c1264f..c933ceb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2020-12-02 Werner Lemberg <wl@gnu.org>
+ [base] Don't close 'stderr' after logging.
+
+ * src/base/ftdebug.c, builds/windows/ftdebug.c (ft_logging_deinit):
+ Fix it.
+
+2020-12-02 Werner Lemberg <wl@gnu.org>
+
* submodules/dlg: Updated to commit 9f0c8b22.
2020-12-02 Werner Lemberg <wl@gnu.org>
diff --git a/builds/windows/ftdebug.c b/builds/windows/ftdebug.c
index c8e811e..389b9d8 100644
--- a/builds/windows/ftdebug.c
+++ b/builds/windows/ftdebug.c
@@ -452,7 +452,8 @@
FT_BASE_DEF( void )
ft_logging_deinit( void )
{
- ft_fclose( ft_fileptr );
+ if ( ft_fileptr != stderr )
+ ft_fclose( ft_fileptr );
}
diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c
index e0b050d..c8340bb 100644
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -439,7 +439,8 @@
FT_BASE_DEF( void )
ft_logging_deinit( void )
{
- ft_fclose( ft_fileptr );
+ if ( ft_fileptr != stderr )
+ ft_fclose( ft_fileptr );
}