From 9fecb853a4f1b06e884cd02d1610a03ccc44b4b4 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 24 Jul 2012 15:02:20 +0900 Subject: [PATCH] windowscodecs: Do not assume that vtable is the first element of the object. --- dlls/windowscodecs/bmpencode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/bmpencode.c b/dlls/windowscodecs/bmpencode.c index dfef7f4d5bf..27922e73296 100644 --- a/dlls/windowscodecs/bmpencode.c +++ b/dlls/windowscodecs/bmpencode.c @@ -87,7 +87,7 @@ static HRESULT WINAPI BmpFrameEncode_QueryInterface(IWICBitmapFrameEncode *iface if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IWICBitmapFrameEncode, iid)) { - *ppv = This; + *ppv = &This->IWICBitmapFrameEncode_iface; } else { @@ -434,7 +434,7 @@ static HRESULT WINAPI BmpEncoder_QueryInterface(IWICBitmapEncoder *iface, REFIID if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IWICBitmapEncoder, iid)) { - *ppv = This; + *ppv = &This->IWICBitmapEncoder_iface; } else {