--- src/sys/platform/pc32/i386/machdep.c 2007/06/29 21:54:10 1.124 +++ src/sys/platform/pc32/i386/machdep.c 2007/07/01 01:11:38 1.125 @@ -712,7 +712,6 @@ void sendupcall(struct vmupcall *vu, int morepending) { struct lwp *lp = curthread->td_lwp; - struct proc *p = lp->lwp_proc; struct trapframe *regs; struct upcall upcall; struct upc_frame upc_frame; @@ -723,7 +722,7 @@ sendupcall(struct vmupcall *vu, int more * context, switch back to the virtual kernel context before * trying to post the signal. */ - if (lp->lwp_ve) { + if (lp->lwp_vkernel && lp->lwp_vkernel->ve) { lp->lwp_md.md_regs->tf_trapno = 0; vkernel_trap(lp, lp->lwp_md.md_regs); }