mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
add NULL checks to QueryInterface
This commit is contained in:
parent
004951a940
commit
248b62a332
@ -18,7 +18,11 @@ HRESULT __stdcall IDirectDraw__QueryInterface(IDirectDrawImpl* This, REFIID riid
|
||||
|
||||
HRESULT ret = E_NOINTERFACE;
|
||||
|
||||
if (riid)
|
||||
if (!ppvObj)
|
||||
{
|
||||
ret = E_INVALIDARG;
|
||||
}
|
||||
else if (riid)
|
||||
{
|
||||
if (IsEqualGUID(&IID_IDirectDraw2, riid) ||
|
||||
IsEqualGUID(&IID_IDirectDraw4, riid) ||
|
||||
|
@ -14,6 +14,12 @@ HRESULT __stdcall IDirectDrawClipper__QueryInterface(IDirectDrawClipperImpl* Thi
|
||||
_ReturnAddress());
|
||||
|
||||
HRESULT ret = E_NOINTERFACE;
|
||||
|
||||
if (!ppvObj)
|
||||
{
|
||||
ret = E_INVALIDARG;
|
||||
}
|
||||
|
||||
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
@ -13,6 +13,12 @@ HRESULT __stdcall IDirectDrawGammaControl__QueryInterface(IDirectDrawGammaContro
|
||||
_ReturnAddress());
|
||||
|
||||
HRESULT ret = E_NOINTERFACE;
|
||||
|
||||
if (!ppvObj)
|
||||
{
|
||||
ret = E_INVALIDARG;
|
||||
}
|
||||
|
||||
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
@ -15,6 +15,12 @@ HRESULT __stdcall IDirectDrawPalette__QueryInterface(IDirectDrawPaletteImpl* Thi
|
||||
_ReturnAddress());
|
||||
|
||||
HRESULT ret = E_NOINTERFACE;
|
||||
|
||||
if (!ppvObj)
|
||||
{
|
||||
ret = E_INVALIDARG;
|
||||
}
|
||||
|
||||
TRACE("NOT_IMPLEMENTED <- %s\n", __FUNCTION__);
|
||||
return ret;
|
||||
}
|
||||
|
@ -11,7 +11,11 @@ HRESULT __stdcall IDirectDrawSurface__QueryInterface(IDirectDrawSurfaceImpl* Thi
|
||||
TRACE("-> %s(This=%p, riid=%08X, ppvObj=%p) [%p]\n", __FUNCTION__, This, (unsigned int)riid, ppvObj, _ReturnAddress());
|
||||
HRESULT ret = S_OK;
|
||||
|
||||
if (riid)
|
||||
if (!ppvObj)
|
||||
{
|
||||
ret = E_INVALIDARG;
|
||||
}
|
||||
else if (riid)
|
||||
{
|
||||
if (IsEqualGUID(&IID_IDirectDrawSurface, riid) ||
|
||||
IsEqualGUID(&IID_IDirectDrawSurface2, riid) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user