From 7eece3deb1667068334c368fdf59eea7f042e91a Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 11 Mar 2017 11:10:56 -0800 Subject: [PATCH] SCP: Allow detaching of buffered devices without a buffer (COVERITY) --- scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scp.c b/scp.c index a3e2b4f4..392f2728 100644 --- a/scp.c +++ b/scp.c @@ -5812,7 +5812,7 @@ if (!(uptr->flags & UNIT_ATT)) { /* not attached? */ } if ((dptr = find_dev_from_unit (uptr)) == NULL) return SCPE_OK; -if (uptr->flags & UNIT_BUF) { +if ((uptr->flags & UNIT_BUF) && (uptr->filebuf)) { uint32 cap = (uptr->hwmark + dptr->aincr - 1) / dptr->aincr; if (uptr->hwmark && ((uptr->flags & UNIT_RO) == 0)) { if (!sim_quiet) {