From a080d60e4cf2643186faa2cf51a5862867af0551 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 10 Oct 2008 09:36:39 +0000 Subject: [PATCH] - Don't use uninitialized INetConnection item - should fix bug 3754 svn path=/trunk/; revision=36704 --- reactos/dll/win32/netshell/lanstatusui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/dll/win32/netshell/lanstatusui.c b/reactos/dll/win32/netshell/lanstatusui.c index 27684d9a631..851c14c6e67 100644 --- a/reactos/dll/win32/netshell/lanstatusui.c +++ b/reactos/dll/win32/netshell/lanstatusui.c @@ -522,7 +522,7 @@ InitializeNetTaskbarNotifications( 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 @@ InitializeNetTaskbarNotifications( } pItem = pItem->pNext; } - return S_OK; + return S_OK; } /* get an instance to of IConnectionManager */ @@ -767,7 +767,7 @@ static const IOleCommandTargetVtbl vt_OleCommandTarget = 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 @@ HRESULT WINAPI LanConnectStatusUI_Constructor (IUnknown * pUnkOuter, REFIID riid 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); }