Author: janderwald
Date: Tue Nov 10 11:04:33 2009
New Revision: 44075
URL:
http://svn.reactos.org/svn/reactos?rev=44075&view=rev
Log:
- Remove ASSERT && add param checks
Modified:
trunk/reactos/dll/directx/dsound_new/classfactory.c
trunk/reactos/dll/directx/dsound_new/directsound.c
trunk/reactos/dll/directx/dsound_new/dsound.c
Modified: trunk/reactos/dll/directx/dsound_new/classfactory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dsound_new/cla…
==============================================================================
--- trunk/reactos/dll/directx/dsound_new/classfactory.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/dsound_new/classfactory.c [iso-8859-1] Tue Nov 10 11:04:33
2009
@@ -86,6 +86,9 @@
{
IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
+ if (!ppvObject)
+ return E_INVALIDARG;
+
*ppvObject = NULL;
if ( This->riidInst==NULL || IsEqualCLSID(riid, This->riidInst) ||
IsEqualCLSID(riid, &IID_IUnknown) )
Modified: trunk/reactos/dll/directx/dsound_new/directsound.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dsound_new/dir…
==============================================================================
--- trunk/reactos/dll/directx/dsound_new/directsound.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/dsound_new/directsound.c [iso-8859-1] Tue Nov 10 11:04:33
2009
@@ -442,6 +442,13 @@
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))
{
Modified: trunk/reactos/dll/directx/dsound_new/dsound.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dsound_new/dso…
==============================================================================
--- trunk/reactos/dll/directx/dsound_new/dsound.c [iso-8859-1] (original)
+++ trunk/reactos/dll/directx/dsound_new/dsound.c [iso-8859-1] Tue Nov 10 11:04:33 2009
@@ -124,8 +124,7 @@
DllGetClassObject(
REFCLSID rclsid,
REFIID riid,
- LPVOID* ppv
-)
+ LPVOID* ppv)
{
LPOLESTR pStr, pStr2;
UINT i;
@@ -153,7 +152,7 @@
DPRINT("No Class Available for %ws IID %ws\n", pStr, pStr2);
CoTaskMemFree(pStr);
CoTaskMemFree(pStr2);
- ASSERT(0);
+ //ASSERT(0);
return CLASS_E_CLASSNOTAVAILABLE;
}