On Wed, Aug 12, 2020 at 08:19:55AM +0800, Dmitry Timoshkov wrote:
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/ole32/hglobalstream.c | 4 ++-- dlls/ole32/tests/hglobalstream.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c index 4590bb9c43..4cfedd66a1 100644 --- a/dlls/ole32/hglobalstream.c +++ b/dlls/ole32/hglobalstream.c @@ -664,10 +664,10 @@ HRESULT WINAPI GetHGlobalFromStream(IStream* pstm, HGLOBAL* phglobal) { HGLOBALStreamImpl* pStream;
- if (pstm == NULL) + if (!pstm || !phglobal) return E_INVALIDARG;
- pStream = (HGLOBALStreamImpl*) pstm; + pStream = impl_from_IStream(pstm);
We don't usually go for these type of parameter checks unless an application needs them, which is why I didn't send it in when I looked at the rest of the series. However, since there's already a check for pstm... Signed-off-by: Huw Davies <huw(a)codeweavers.com>