aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2005-04-28 14:37:20 +0000
committerPaul Brook <paul@codesourcery.com>2005-04-28 14:37:20 +0000
commit2b8857fbfc5d0cc8b1b6f3d906120169465fd2ba (patch)
treed2b31ba365f232aa158c6a778791d062d64ac9e5
parentb9f15429d3da2ae3194bfeb133bdca490e426931 (diff)
downloadgdb-2b8857fbfc5d0cc8b1b6f3d906120169465fd2ba.zip
gdb-2b8857fbfc5d0cc8b1b6f3d906120169465fd2ba.tar.gz
gdb-2b8857fbfc5d0cc8b1b6f3d906120169465fd2ba.tar.bz2
2005-04-28 Paul Brook <paul@codesourcery.com>
* exceptions.c (print_flush): Handle NULL gdb_stdout_serial.
-rw-r--r--gdb/exceptions.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index 98e6f25..f5ffca8 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 ();
}