mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
windowscodecs: Do not assume that vtable is the first element of the object, avoid not necessary casts.
This commit is contained in:
parent
19479795d9
commit
6859a15b07
1 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ static HRESULT WINAPI ComponentFactory_QueryInterface(IWICComponentFactory *ifac
|
|||
IsEqualIID(&IID_IWICImagingFactory, iid) ||
|
||||
IsEqualIID(&IID_IWICComponentFactory, iid))
|
||||
{
|
||||
*ppv = This;
|
||||
*ppv = &This->IWICComponentFactory_iface;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -650,8 +650,8 @@ HRESULT ComponentFactory_CreateInstance(IUnknown *pUnkOuter, REFIID iid, void**
|
|||
This->IWICComponentFactory_iface.lpVtbl = &ComponentFactory_Vtbl;
|
||||
This->ref = 1;
|
||||
|
||||
ret = IUnknown_QueryInterface((IUnknown*)This, iid, ppv);
|
||||
IUnknown_Release((IUnknown*)This);
|
||||
ret = IWICComponentFactory_QueryInterface(&This->IWICComponentFactory_iface, iid, ppv);
|
||||
IWICComponentFactory_Release(&This->IWICComponentFactory_iface);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue