From 9436d05db118701702c18217b8d3f052f7eefd1e Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Tue, 20 Jun 1995 00:10:40 +0000 Subject: (fshelp_fetch_control): Only frob refs if control is non-null. --- libfshelp/fetch-control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libfshelp/fetch-control.c') diff --git a/libfshelp/fetch-control.c b/libfshelp/fetch-control.c index 32b28ddf..26c12d88 100644 --- a/libfshelp/fetch-control.c +++ b/libfshelp/fetch-control.c @@ -25,6 +25,7 @@ fshelp_fetch_control (struct transbox *box, mach_port_t *control) { *control = box->active; - mach_port_mod_refs (mach_task_self (), *control, MACH_PORT_RIGHT_SEND, 1); + if (*control != MACH_PORT_NULL) + mach_port_mod_refs (mach_task_self (), *control, MACH_PORT_RIGHT_SEND, 1); return 0; } -- cgit v1.2.3