summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--term/devio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/term/devio.c b/term/devio.c
index 671d63d1..e8f7f0b6 100644
--- a/term/devio.c
+++ b/term/devio.c
@@ -339,6 +339,11 @@ static void
devio_abandon_physical_output ()
{
int val = D_WRITE;
+
+ /* If this variable is clear, then carrier is gone, so we
+ have nothing to do. */
+ if (!phys_reply_writes_pi)
+ return;
mach_port_deallocate (mach_task_self (), phys_reply_writes);
ports_reallocate_port (phys_reply_writes_pi);