--- trunk/reactos/subsys/win32k/ntuser/msgqueue.c 2005-07-18 14:10:56 UTC (rev 16633)
+++ trunk/reactos/subsys/win32k/ntuser/msgqueue.c 2005-07-18 15:05:58 UTC (rev 16634)
@@ -1423,6 +1423,13 @@
CurrentSentMessage = CONTAINING_RECORD(CurrentEntry, USER_SENT_MESSAGE,
ListEntry);
+ IntLockMessageQueue(CurrentSentMessage->SenderQueue);
+ /* remove the message from the dispatching list */
+ if(CurrentSentMessage->DispatchingListEntry.Flink != NULL)
+ {
+ RemoveEntryList(&CurrentSentMessage->DispatchingListEntry);
+ }
+
DPRINT("Notify the sender, the thread has been terminated while dispatching a message!\n");
/* wake the sender's thread */
@@ -1430,7 +1437,8 @@
{
KeSetEvent(CurrentSentMessage->CompletionEvent, IO_NO_INCREMENT, FALSE);
}
-
+ IntUnLockMessageQueue(CurrentSentMessage->SenderQueue);
+
/* dereference our and the sender's message queue */
IntDereferenceMessageQueue(MessageQueue);
IntDereferenceMessageQueue(CurrentSentMessage->SenderQueue);