riched20: Handle QI failure in ME_GetOLEObjectSize.

This commit is contained in:
Qian Hong 2014-09-01 10:00:59 +08:00 committed by Alexandre Julliard
parent 37d628cdc9
commit 3881adf244
1 changed files with 6 additions and 1 deletions

View File

@ -1586,7 +1586,12 @@ void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize)
return; return;
} }
IOleObject_QueryInterface(run->ole_obj->poleobj, &IID_IDataObject, (void**)&ido); if (IOleObject_QueryInterface(run->ole_obj->poleobj, &IID_IDataObject, (void**)&ido) != S_OK)
{
FIXME("Query Interface IID_IDataObject failed!\n");
pSize->cx = pSize->cy = 0;
return;
}
fmt.cfFormat = CF_BITMAP; fmt.cfFormat = CF_BITMAP;
fmt.ptd = NULL; fmt.ptd = NULL;
fmt.dwAspect = DVASPECT_CONTENT; fmt.dwAspect = DVASPECT_CONTENT;