Aric Stewart : ws2_32: Only set the overlapped hEvent if it exists.

Alexandre Julliard julliard at winehq.org
Wed Oct 29 09:39:53 CDT 2008


Module: wine
Branch: master
Commit: 6b4d22ca2c26fcb098cf333c1fa0a00390e1f213
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6b4d22ca2c26fcb098cf333c1fa0a00390e1f213

Author: Aric Stewart <aric at codeweavers.com>
Date:   Tue Oct 28 10:37:43 2008 -0500

ws2_32: Only set the overlapped hEvent if it exists.

---

 dlls/ws2_32/socket.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 7449f11..b485777 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2757,7 +2757,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
         if (!wsa->completion_func)
         {
             if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n );
-            SetEvent( lpOverlapped->hEvent );
+            if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent );
             HeapFree( GetProcessHeap(), 0, wsa );
         }
         else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc,
@@ -4279,7 +4279,7 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
             if (!wsa->completion_func)
             {
                 if (cvalue) WS_AddCompletion( s, cvalue, STATUS_SUCCESS, n );
-                SetEvent( lpOverlapped->hEvent );
+                if (lpOverlapped->hEvent) SetEvent( lpOverlapped->hEvent );
                 HeapFree( GetProcessHeap(), 0, wsa );
             }
             else NtQueueApcThread( GetCurrentThread(), (PNTAPCFUNC)ws2_async_apc,




More information about the wine-cvs mailing list