I hate making the same mistake twice in one day
authorCameron Gutman <aicommander@gmail.com>
Mon, 7 Jun 2010 00:44:00 +0000 (00:44 +0000)
committerCameron Gutman <aicommander@gmail.com>
Mon, 7 Jun 2010 00:44:00 +0000 (00:44 +0000)
svn path=/trunk/; revision=47647

reactos/dll/win32/msafd/misc/dllmain.c

index 9142a39..c8da974 100644 (file)
@@ -22,7 +22,6 @@ DWORD DebugTraceLevel = 0;
 HANDLE GlobalHeap;
 WSPUPCALLTABLE Upcalls;
 LPWPUCOMPLETEOVERLAPPEDREQUEST lpWPUCompleteOverlappedRequest;
-ULONG SocketCount = 0;
 PSOCKET_INFORMATION SocketListHead = NULL;
 LIST_ENTRY SockHelpersListHead = { NULL, NULL };
 ULONG SockAsyncThreadRefCount;
@@ -2267,6 +2266,9 @@ GetSocketStructure(SOCKET Handle)
 {
     PSOCKET_INFORMATION CurrentSocket;
 
+    if (!SocketListHead)
+        return NULL;
+
     /* This is a special case */
     if (SocketListHead->Handle == Handle)
         return SocketListHead;