summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libports/begin-rpc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libports/begin-rpc.c b/libports/begin-rpc.c
index e1541b1d..83cb35b8 100644
--- a/libports/begin-rpc.c
+++ b/libports/begin-rpc.c
@@ -71,7 +71,8 @@ ports_begin_rpc (void *portstruct, struct rpc_info *info)
/* Record that that an RPC is in progress */
info->thread = hurd_thread_self ();
info->next = pi->current_rpcs;
- pi->current_rpcs->prevp = &info->next;
+ if (pi->current_rpcs)
+ pi->current_rpcs->prevp = &info->next;
info->prevp = &pi->current_rpcs;
pi->current_rpcs = info;