dmloader: Fixed crash in releasing DMusicContainer
Piotr Caban
piotr.caban at gmail.com
Fri Jun 30 06:39:17 CDT 2006
Hi,
Changelog:
- Fixed crash in releasing DMusicContainer
dlls/dmloader/container.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
--
Piotr
-------------- next part --------------
diff --git a/dlls/dmloader/container.c b/dlls/dmloader/container.c
index 2eda426..2efc820 100644
--- a/dlls/dmloader/container.c
+++ b/dlls/dmloader/container.c
@@ -914,10 +914,16 @@ HRESULT WINAPI DMUSIC_DestroyDirectMusic
/* get loader (from stream we loaded from) */
TRACE(": getting loader\n");
+ if(!This->pStream)
+ {
+ InterlockedDecrement (&dwDirectMusicContainer);
+ return S_OK;
+ }
+
IStream_QueryInterface (This->pStream, &IID_IDirectMusicGetLoader, (LPVOID*)&pGetLoader);
IDirectMusicGetLoader_GetLoader (pGetLoader, &pLoader);
IDirectMusicGetLoader_Release (pGetLoader);
-
+
/* release objects from loader's cache (if appropriate) */
TRACE(": releasing objects from loader's cache\n");
LIST_FOR_EACH (pEntry, This->pContainedObjects) {
More information about the wine-patches
mailing list