Commit 35548d15 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Fix Read/WriteClassStm to return an error if the passed in stream pointer is NULL.

parent 923bc6bf
......@@ -7901,7 +7901,7 @@ HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid)
{
TRACE("(%p,%p)\n",pStm,rclsid);
if (rclsid==NULL)
if (!pStm || !rclsid)
return E_INVALIDARG;
return IStream_Write(pStm,rclsid,sizeof(CLSID),NULL);
......@@ -7927,7 +7927,7 @@ HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid)
TRACE("(%p,%p)\n",pStm,pclsid);
if (pclsid==NULL)
if (!pStm || !pclsid)
return E_INVALIDARG;
res = IStream_Read(pStm,(void*)pclsid,sizeof(CLSID),&nbByte);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment