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

This commit is contained in:
Rob Shearman 2007-01-09 17:17:40 +00:00 committed by Alexandre Julliard
parent 923bc6bf3d
commit 35548d15c4

View File

@ -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);