aboutsummaryrefslogtreecommitdiff
path: root/gdb/exceptions.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2005-04-28 14:07:54 +0000
committerPaul Brook <paul@codesourcery.com>2005-04-28 14:07:54 +0000
commitcade9e545bdff114757148b85a70d671b32c5101 (patch)
tree1496d37da272d581621c26d530b795ceb10d90f6 /gdb/exceptions.c
parent0291d2913e5079196f586d80a3424c835aec736e (diff)
downloadgdb-cade9e545bdff114757148b85a70d671b32c5101.zip
gdb-cade9e545bdff114757148b85a70d671b32c5101.tar.gz
gdb-cade9e545bdff114757148b85a70d671b32c5101.tar.bz2
2005-04-28 Paul Brook <paul@codesourcery.com>
* exceptions.c (print_flush): Handle NULL gdb_stdout_serial.
Diffstat (limited to 'gdb/exceptions.c')
-rw-r--r--gdb/exceptions.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index 37b8a9e..de01266 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 ();
}