oleaut32: Check pointer in IPicture::get_Handle.
This commit is contained in:
parent
65b3393dce
commit
a22ca1c2d9
|
@ -519,6 +519,10 @@ static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface,
|
|||
{
|
||||
OLEPictureImpl *This = (OLEPictureImpl *)iface;
|
||||
TRACE("(%p)->(%p)\n", This, phandle);
|
||||
|
||||
if(!phandle)
|
||||
return E_POINTER;
|
||||
|
||||
switch(This->desc.picType) {
|
||||
case PICTYPE_NONE:
|
||||
case PICTYPE_UNINITIALIZED:
|
||||
|
|
|
@ -674,6 +674,19 @@ static void test_get_Attributes(void)
|
|||
IPicture_Release(pic);
|
||||
}
|
||||
|
||||
static void test_get_Handle(void)
|
||||
{
|
||||
IPicture *pic;
|
||||
HRESULT hres;
|
||||
|
||||
OleCreatePictureIndirect(NULL, &IID_IPicture, TRUE, (VOID**)&pic);
|
||||
|
||||
hres = IPicture_get_Handle(pic, NULL);
|
||||
ole_expect(hres, E_POINTER);
|
||||
|
||||
IPicture_Release(pic);
|
||||
}
|
||||
|
||||
START_TEST(olepicture)
|
||||
{
|
||||
hOleaut32 = GetModuleHandleA("oleaut32.dll");
|
||||
|
@ -702,6 +715,7 @@ START_TEST(olepicture)
|
|||
test_OleCreatePictureIndirect();
|
||||
test_Render();
|
||||
test_get_Attributes();
|
||||
test_get_Handle();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue