mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
- Remove ASSERT && add param checks
svn path=/trunk/; revision=44075
This commit is contained in:
parent
dcb1336203
commit
c3eaa577c4
3 changed files with 12 additions and 3 deletions
|
@ -86,6 +86,9 @@ IClassFactory_fnCreateInstance(
|
|||
{
|
||||
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
|
||||
|
||||
if (!ppvObject)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*ppvObject = NULL;
|
||||
|
||||
if ( This->riidInst==NULL || IsEqualCLSID(riid, This->riidInst) || IsEqualCLSID(riid, &IID_IUnknown) )
|
||||
|
|
|
@ -442,6 +442,13 @@ NewDirectSound(
|
|||
LPOLESTR pStr;
|
||||
LPCDirectSoundImpl This;
|
||||
|
||||
/* check param */
|
||||
if (!ppvObject)
|
||||
{
|
||||
/* invalid param */
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
/* check requested interface */
|
||||
if (!IsEqualIID(riid, &IID_IUnknown) && !IsEqualIID(riid, &IID_IDirectSound) && !IsEqualIID(riid, &IID_IDirectSound8))
|
||||
{
|
||||
|
|
|
@ -124,8 +124,7 @@ WINAPI
|
|||
DllGetClassObject(
|
||||
REFCLSID rclsid,
|
||||
REFIID riid,
|
||||
LPVOID* ppv
|
||||
)
|
||||
LPVOID* ppv)
|
||||
{
|
||||
LPOLESTR pStr, pStr2;
|
||||
UINT i;
|
||||
|
@ -153,7 +152,7 @@ DllGetClassObject(
|
|||
DPRINT("No Class Available for %ws IID %ws\n", pStr, pStr2);
|
||||
CoTaskMemFree(pStr);
|
||||
CoTaskMemFree(pStr2);
|
||||
ASSERT(0);
|
||||
//ASSERT(0);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue