- Remove ASSERT && add param checks
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Tue, 10 Nov 2009 10:04:33 +0000 (10:04 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Tue, 10 Nov 2009 10:04:33 +0000 (10:04 +0000)
svn path=/trunk/; revision=44075

reactos/dll/directx/dsound_new/classfactory.c
reactos/dll/directx/dsound_new/directsound.c
reactos/dll/directx/dsound_new/dsound.c

index ee31e61..64d2f8f 100644 (file)
@@ -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) )
index 12b03cf..754f56b 100644 (file)
@@ -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))
     {
index e8322eb..c88fc00 100644 (file)
@@ -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;
     }