2005-04-28 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Thu, 28 Apr 2005 14:07:54 +0000 (14:07 +0000)
committerPaul Brook <paul@codesourcery.com>
Thu, 28 Apr 2005 14:07:54 +0000 (14:07 +0000)
* exceptions.c (print_flush): Handle NULL gdb_stdout_serial.

gdb/ChangeLog
gdb/exceptions.c

index f66c6395b222814bad260041fa8ecaffd3c6fc4f..ec901c167a099473a1e14de802371a633b5dbe25 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-28  Paul Brook  <paul@codesourcery.com>
+
+       * exceptions.c (print_flush): Handle NULL gdb_stdout_serial.
+
 2005-04-27  Mark Kettenis  <kettenis@gnu.org>
 
        * solib-svr4.c (_initialize_svr4_solib)
index 37b8a9e1872e71eeb58c229d8d259a8a3b746336..de01266d89175f4d47dbd8a7cdf0f202359883c1 100644 (file)
@@ -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 ();
 }