Author: janderwald
Date: Fri Oct 10 04:36:39 2008
New Revision: 36704
URL:
http://svn.reactos.org/svn/reactos?rev=36704&view=rev
Log:
- Don't use uninitialized INetConnection item
- should fix bug 3754
Modified:
trunk/reactos/dll/win32/netshell/lanstatusui.c
Modified: trunk/reactos/dll/win32/netshell/lanstatusui.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanstatusui.c [iso-8859-1] Fri Oct 10 04:36:39 2008
@@ -522,7 +522,7 @@
pItem = This->pHead;
while(pItem)
{
- hr = INetConnection_GetProperties(INetCon, &pProps);
+ hr = INetConnection_GetProperties(pItem->pNet, &pProps);
if (SUCCEEDED(hr))
{
ZeroMemory(&nid, sizeof(nid));
@@ -541,7 +541,7 @@
}
pItem = pItem->pNext;
}
- return S_OK;
+ return S_OK;
}
/* get an instance to of IConnectionManager */
@@ -767,7 +767,7 @@
HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID
* ppv)
{
ILanStatusImpl * This;
- static ILanStatusImpl *cached_This = NULL;
+ static volatile ILanStatusImpl *cached_This = NULL;
if (!ppv)
return E_POINTER;
@@ -784,7 +784,7 @@
This->lpNetMan = NULL;
This->pHead = NULL;
- if (InterlockedCompareExchangePointer((void *)&cached_This, This, NULL) != NULL)
+ if (InterlockedCompareExchangePointer((volatile void **)&cached_This, This, NULL)
!= NULL)
{
CoTaskMemFree(This);
}