[DSOUND] create bug

Robert Reif reif at earthlink.net
Mon May 30 08:27:26 CDT 2005


Fix create bug found by Mike Hearn.
-------------- next part --------------
Index: dlls/dsound/dsound.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/dsound.c,v
retrieving revision 1.32
diff -p -u -r1.32 dsound.c
--- dlls/dsound/dsound.c	6 May 2005 19:33:32 -0000	1.32
+++ dlls/dsound/dsound.c	30 May 2005 13:22:59 -0000
@@ -1653,8 +1653,10 @@ HRESULT WINAPI DSOUND_Create(
                 WARN("IDirectSound_IDirectSound_Create failed\n");
                 IDirectSound8_Release(pDS);
             }
-        } else
+        } else {
             WARN("IDirectSoundImpl_Create failed\n");
+            *ppDS = NULL;
+        }
     }
 
     return hr;
@@ -1758,8 +1760,10 @@ HRESULT WINAPI DSOUND_Create8(
                 WARN("IDirectSound8_IDirectSound8_Create failed\n");
                 IDirectSound8_Release(pDS);
             }
-        } else
+        } else {
             WARN("IDirectSoundImpl_Create failed\n");
+            *ppDS = NULL;
+        }
     }
 
     return hr;


More information about the wine-patches mailing list