Nikolay Sivov : oleaut32/tests: Correctly return interface pointer.
Module: wine Branch: master Commit: 73a0ddfa4715defe3bc27c5f32f31e83db0f3208 URL: http://source.winehq.org/git/wine.git/?a=commit;h=73a0ddfa4715defe3bc27c5f32... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Feb 5 19:54:44 2017 +0300 oleaut32/tests: Correctly return interface pointer. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/olepicture.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index b716f25..4a81e2e 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -1391,14 +1391,9 @@ static HRESULT WINAPI NoStatStreamImpl_QueryInterface( NoStatStreamImpl* const This = impl_from_IStream(iface); if (ppvObject==0) return E_INVALIDARG; *ppvObject = 0; - if (IsEqualIID(&IID_IUnknown, riid)) - { - *ppvObject = This; - } - else if (IsEqualIID(&IID_IStream, riid)) - { - *ppvObject = This; - } + + if (IsEqualIID(&IID_IUnknown, riid) || IsEqualIID(&IID_IStream, riid)) + *ppvObject = &This->IStream_iface; if ((*ppvObject)==0) return E_NOINTERFACE;
participants (1)
-
Alexandre Julliard