Commit bea05609 authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Check whether senderQ is NULL before trying to lock it.

parent c702f0e6
...@@ -989,7 +989,7 @@ BOOL WINAPI ReplyMessage( LRESULT result ) ...@@ -989,7 +989,7 @@ BOOL WINAPI ReplyMessage( LRESULT result )
ReplyMessage */ ReplyMessage */
QUEUE_RemoveSMSG( queue, SM_WAITING_LIST, smsg ); QUEUE_RemoveSMSG( queue, SM_WAITING_LIST, smsg );
EnterCriticalSection(&senderQ->cSection); if (senderQ) EnterCriticalSection(&senderQ->cSection);
/* tell the sender we're all done with smsg structure */ /* tell the sender we're all done with smsg structure */
smsg->flags |= SMSG_RECEIVED; smsg->flags |= SMSG_RECEIVED;
...@@ -1002,8 +1002,8 @@ BOOL WINAPI ReplyMessage( LRESULT result ) ...@@ -1002,8 +1002,8 @@ BOOL WINAPI ReplyMessage( LRESULT result )
TRACE_(sendmsg)("Receiver cleans up!\n" ); TRACE_(sendmsg)("Receiver cleans up!\n" );
HeapFree( SystemHeap, 0, smsg ); HeapFree( SystemHeap, 0, smsg );
} }
LeaveCriticalSection(&senderQ->cSection); if (senderQ) LeaveCriticalSection(&senderQ->cSection);
} }
ReplyMessageEnd: ReplyMessageEnd:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment