mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:20:20 +00:00
windowscodecs: Do not assume that vtable is the first element of the object.
This commit is contained in:
parent
f3e1e46c85
commit
022824100e
|
@ -94,6 +94,8 @@ static inline BmpDecoder *impl_from_IWICBitmapFrameDecode(IWICBitmapFrameDecode
|
|||
static HRESULT WINAPI BmpFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface, REFIID iid,
|
||||
void **ppv)
|
||||
{
|
||||
BmpDecoder *This = impl_from_IWICBitmapFrameDecode(iface);
|
||||
|
||||
TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
|
||||
|
||||
if (!ppv) return E_INVALIDARG;
|
||||
|
@ -102,7 +104,7 @@ static HRESULT WINAPI BmpFrameDecode_QueryInterface(IWICBitmapFrameDecode *iface
|
|||
IsEqualIID(&IID_IWICBitmapSource, iid) ||
|
||||
IsEqualIID(&IID_IWICBitmapFrameDecode, iid))
|
||||
{
|
||||
*ppv = iface;
|
||||
*ppv = &This->IWICBitmapFrameDecode_iface;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -964,9 +966,10 @@ static HRESULT WINAPI BmpDecoder_QueryInterface(IWICBitmapDecoder *iface, REFIID
|
|||
|
||||
if (!ppv) return E_INVALIDARG;
|
||||
|
||||
if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IWICBitmapDecoder, iid))
|
||||
if (IsEqualIID(&IID_IUnknown, iid) ||
|
||||
IsEqualIID(&IID_IWICBitmapDecoder, iid))
|
||||
{
|
||||
*ppv = This;
|
||||
*ppv = &This->IWICBitmapDecoder_iface;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue