From cade9e545bdff114757148b85a70d671b32c5101 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 28 Apr 2005 14:07:54 +0000 Subject: [PATCH] 2005-04-28 Paul Brook * exceptions.c (print_flush): Handle NULL gdb_stdout_serial. --- gdb/ChangeLog | 4 ++++ gdb/exceptions.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f66c6395b22..ec901c167a0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2005-04-28 Paul Brook + + * exceptions.c (print_flush): Handle NULL gdb_stdout_serial. + 2005-04-27 Mark Kettenis * solib-svr4.c (_initialize_svr4_solib) diff --git a/gdb/exceptions.c b/gdb/exceptions.c index 37b8a9e1872..de01266d891 100644 --- a/gdb/exceptions.c +++ b/gdb/exceptions.c @@ -282,8 +282,11 @@ print_flush (void) /* 3. The system-level buffer. */ gdb_stdout_serial = serial_fdopen (1); - serial_drain_output (gdb_stdout_serial); - serial_un_fdopen (gdb_stdout_serial); + if (gdb_stdout_serial) + { + serial_drain_output (gdb_stdout_serial); + serial_un_fdopen (gdb_stdout_serial); + } annotate_error_begin (); } -- 2.30.2