From 9ff89d4fd797ce030deef29f80b1d246cfa9b0b9 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sat, 30 Apr 2005 17:43:18 +0000 Subject: [PATCH] Add hack for ROS's weird behavior. Will investigate but this lets you boot for now svn path=/trunk/; revision=14884 --- reactos/ntoskrnl/io/irp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/io/irp.c b/reactos/ntoskrnl/io/irp.c index a6fd4ea30f1..ed84e506b9f 100644 --- a/reactos/ntoskrnl/io/irp.c +++ b/reactos/ntoskrnl/io/irp.c @@ -1288,7 +1288,10 @@ IoSecondStageCompletion(PKAPC Apc, /* Dereference the Event if this is an ASYNC IRP */ if (!Irp->Flags & IRP_SYNCHRONOUS_API) { - ObDereferenceObject(Irp->UserEvent); + if (Irp->UserEvent != &FileObject->Event) + { + ObDereferenceObject(Irp->UserEvent); + } } /* If the File Object is SYNC, then we need to signal its event too */ @@ -1382,7 +1385,10 @@ IoSecondStageCompletion(PKAPC Apc, /* Dereference the Event if it's an ASYNC IRP on a File Object */ if (Irp->UserEvent && !(Irp->Flags & IRP_SYNCHRONOUS_API) && FileObject) { - ObDereferenceObject(Irp->UserEvent); + if (Irp->UserEvent != &FileObject->Event) + { + ObDereferenceObject(Irp->UserEvent); + } } /* Dereference the File Object */