Commit 71a3fe3c authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32: Remove some useless null checks.

parent 88136e68
...@@ -480,15 +480,6 @@ static HRESULT WINAPI OLEFontImpl_QueryInterface( ...@@ -480,15 +480,6 @@ static HRESULT WINAPI OLEFontImpl_QueryInterface(
OLEFontImpl *this = (OLEFontImpl *)iface; OLEFontImpl *this = (OLEFontImpl *)iface;
TRACE("(%p)->(%s, %p)\n", this, debugstr_guid(riid), ppvObject); TRACE("(%p)->(%s, %p)\n", this, debugstr_guid(riid), ppvObject);
/*
* Perform a sanity check on the parameters.
*/
if ( (this==0) || (ppvObject==0) )
return E_INVALIDARG;
/*
* Initialize the return parameter.
*/
*ppvObject = 0; *ppvObject = 0;
/* /*
...@@ -1143,7 +1134,7 @@ static HRESULT WINAPI OLEFontImpl_IsEqual( ...@@ -1143,7 +1134,7 @@ static HRESULT WINAPI OLEFontImpl_IsEqual(
INT ret; INT ret;
INT left_len,right_len; INT left_len,right_len;
if((iface == NULL) || (pFontOther == NULL)) if(pFontOther == NULL)
return E_POINTER; return E_POINTER;
else if (left->description.cySize.s.Lo != right->description.cySize.s.Lo) else if (left->description.cySize.s.Lo != right->description.cySize.s.Lo)
return S_FALSE; return S_FALSE;
......
...@@ -127,6 +127,9 @@ static void test_QueryInterface(void) ...@@ -127,6 +127,9 @@ static void test_QueryInterface(void)
IFont* font = NULL; IFont* font = NULL;
LONG ret; LONG ret;
hres = pOleCreateFontIndirect(NULL, &IID_IFont, NULL);
ok(hres == E_POINTER, "got 0x%08x\n", hres);
hres = pOleCreateFontIndirect(NULL, &IID_IFont, &pvObj); hres = pOleCreateFontIndirect(NULL, &IID_IFont, &pvObj);
font = pvObj; font = pvObj;
......
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