From d795115010b3921993331a21b5854dcb8b21b655 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 26 Feb 1996 22:14:14 +0000 Subject: (ports_interrupt_rpc_on_notification): Only set _PORTS_NOTIFICATIONS->prevp if _PORTS_NOTIFICATIONS != 0. --- libports/interrupt-on-notify.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libports/interrupt-on-notify.c b/libports/interrupt-on-notify.c index 62f67768..74a50875 100644 --- a/libports/interrupt-on-notify.c +++ b/libports/interrupt-on-notify.c @@ -1,6 +1,6 @@ /* Mark an rpc to be interrupted when a port dies - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by Miles Bader @@ -92,7 +92,8 @@ ports_interrupt_rpc_on_notification (void *object, pn->next = _ports_notifications; pn->prevp = &_ports_notifications; - _ports_notifications->prevp = &pn->next; + if (_ports_notifications) + _ports_notifications->prevp = &pn->next; _ports_notifications = pn; } -- cgit v1.2.3