Nikolay Sivov : oleaut32/tests: Correctly return interface pointer.
Alexandre Julliard
julliard at winehq.org
Mon Feb 6 16:31:18 CST 2017
Module: wine
Branch: master
Commit: 73a0ddfa4715defe3bc27c5f32f31e83db0f3208
URL: http://source.winehq.org/git/wine.git/?a=commit;h=73a0ddfa4715defe3bc27c5f32f31e83db0f3208
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Feb 5 19:54:44 2017 +0300
oleaut32/tests: Correctly return interface pointer.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
More information about the wine-cvs
mailing list