Maarten Lankhorst : dsound: Handle failing of obtaining
IDsDriverNotify.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 16 05:38:29 CDT 2007
Module: wine
Branch: master
Commit: b42287ca66e88742828e2409c11e701a22f8f057
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b42287ca66e88742828e2409c11e701a22f8f057
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Wed Aug 15 16:43:41 2007 +0200
dsound: Handle failing of obtaining IDsDriverNotify.
---
dlls/dsound/capture.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
index 833c039..684495d 100644
--- a/dlls/dsound/capture.c
+++ b/dlls/dsound/capture.c
@@ -765,17 +765,18 @@ IDirectSoundCaptureBufferImpl_QueryInterface(
if (!This->notify)
hres = IDirectSoundCaptureNotifyImpl_Create(This, &This->notify);
if (This->notify) {
- if (This->device->hwbuf) {
+ IDirectSoundNotify_AddRef((LPDIRECTSOUNDNOTIFY)This->notify);
+ if (This->device->hwbuf && !This->hwnotify) {
hres = IDsCaptureDriverBuffer_QueryInterface(This->device->hwbuf,
&IID_IDsDriverNotify, (LPVOID*)&(This->hwnotify));
if (hres != DS_OK) {
WARN("IDsCaptureDriverBuffer_QueryInterface failed\n");
+ IDirectSoundNotify_Release((LPDIRECTSOUNDNOTIFY)This->notify);
*ppobj = 0;
return hres;
}
}
- IDirectSoundNotify_AddRef((LPDIRECTSOUNDNOTIFY)This->notify);
*ppobj = (LPVOID)This->notify;
return DS_OK;
}
More information about the wine-cvs
mailing list