add NULL checks to QueryInterface

This commit is contained in:
FunkyFr3sh 2024-08-31 11:12:39 +02:00
parent 004951a940
commit 248b62a332
5 changed files with 28 additions and 2 deletions

View file

@ -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) ||