oleaut32: Check pointer in IPicture::get_Type.
This commit is contained in:
parent
a22ca1c2d9
commit
b91f4a3dae
|
@ -595,6 +595,10 @@ static HRESULT WINAPI OLEPictureImpl_get_Type(IPicture *iface,
|
||||||
{
|
{
|
||||||
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
||||||
TRACE("(%p)->(%p): type is %d\n", This, ptype, This->desc.picType);
|
TRACE("(%p)->(%p): type is %d\n", This, ptype, This->desc.picType);
|
||||||
|
|
||||||
|
if(!ptype)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
*ptype = This->desc.picType;
|
*ptype = This->desc.picType;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -687,6 +687,19 @@ static void test_get_Handle(void)
|
||||||
IPicture_Release(pic);
|
IPicture_Release(pic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_get_Type(void)
|
||||||
|
{
|
||||||
|
IPicture *pic;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic);
|
||||||
|
|
||||||
|
hres = IPicture_get_Type(pic, NULL);
|
||||||
|
ole_expect(hres, E_POINTER);
|
||||||
|
|
||||||
|
IPicture_Release(pic);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(olepicture)
|
START_TEST(olepicture)
|
||||||
{
|
{
|
||||||
hOleaut32 = GetModuleHandleA("oleaut32.dll");
|
hOleaut32 = GetModuleHandleA("oleaut32.dll");
|
||||||
|
@ -716,6 +729,7 @@ START_TEST(olepicture)
|
||||||
test_Render();
|
test_Render();
|
||||||
test_get_Attributes();
|
test_get_Attributes();
|
||||||
test_get_Handle();
|
test_get_Handle();
|
||||||
|
test_get_Type();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue