Commit 9c6fca1f authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

urlmon: The callback parameter can be null, check pointer before using.

parent fd812bdc
......@@ -410,54 +410,86 @@ static HRESULT WINAPI ProxyBindStatusCallback_OnStartBinding(IBindStatusCallback
IBinding *pib)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_OnStartBinding(This->pBSC, dwReserved, pib);
if(This->pBSC)
return IBindStatusCallback_OnStartBinding(This->pBSC, dwReserved, pib);
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_GetPriority(IBindStatusCallback *iface, LONG *pnPriority)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_GetPriority(This->pBSC, pnPriority);
if(This->pBSC)
return IBindStatusCallback_GetPriority(This->pBSC, pnPriority);
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_OnLowResource(IBindStatusCallback *iface, DWORD reserved)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_OnLowResource(This->pBSC, reserved);
if(This->pBSC)
return IBindStatusCallback_OnLowResource(This->pBSC, reserved);
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress,
ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_OnProgress(This->pBSC, ulProgress,
if(This->pBSC)
return IBindStatusCallback_OnProgress(This->pBSC, ulProgress,
ulProgressMax, ulStatusCode,
szStatusText);
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_OnStopBinding(IBindStatusCallback *iface, HRESULT hresult, LPCWSTR szError)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_OnStopBinding(This->pBSC, hresult, szError);
if(This->pBSC)
return IBindStatusCallback_OnStopBinding(This->pBSC, hresult, szError);
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_GetBindInfo(IBindStatusCallback *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo);
if(This->pBSC)
return IBindStatusCallback_GetBindInfo(This->pBSC, grfBINDF, pbindinfo);
return E_INVALIDARG;
}
static HRESULT WINAPI ProxyBindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF,
DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_OnDataAvailable(This->pBSC, grfBSCF, dwSize,
if(This->pBSC)
return IBindStatusCallback_OnDataAvailable(This->pBSC, grfBSCF, dwSize,
pformatetc, pstgmed);
return S_OK;
}
static HRESULT WINAPI ProxyBindStatusCallback_OnObjectAvailable(IBindStatusCallback *iface, REFIID riid, IUnknown *punk)
{
ProxyBindStatusCallback *This = (ProxyBindStatusCallback *)iface;
return IBindStatusCallback_OnObjectAvailable(This->pBSC, riid, punk);
if(This->pBSC)
return IBindStatusCallback_OnObjectAvailable(This->pBSC, riid, punk);
return S_OK;
}
static HRESULT WINAPI BlockingBindStatusCallback_OnDataAvailable(IBindStatusCallback *iface, DWORD grfBSCF,
......
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