Marcus Meissner : dsound: Check for NULL listener (Coverity).
Alexandre Julliard
julliard at winehq.org
Mon Oct 19 09:56:08 CDT 2009
Module: wine
Branch: master
Commit: 61393fa021f271a7751aee41260f63a501443854
URL: http://source.winehq.org/git/wine.git/?a=commit;h=61393fa021f271a7751aee41260f63a501443854
Author: Marcus Meissner <marcus at jet.franken.de>
Date: Sat Oct 17 17:21:00 2009 +0200
dsound: Check for NULL listener (Coverity).
---
dlls/dsound/tests/ds3d8.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c
index 9dfdd31..8ad428d 100644
--- a/dlls/dsound/tests/ds3d8.c
+++ b/dlls/dsound/tests/ds3d8.c
@@ -767,9 +767,11 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
}
EXIT1:
if (has_listener) {
- ref=IDirectSound3DListener_Release(listener);
- ok(ref==0,"IDirectSound3dListener_Release() listener has %d "
- "references, should have 0\n",ref);
+ if (listener) {
+ ref=IDirectSound3DListener_Release(listener);
+ ok(ref==0,"IDirectSound3dListener_Release() listener has %d "
+ "references, should have 0\n",ref);
+ }
} else {
ref=IDirectSoundBuffer_Release(primary);
ok(ref==0,"IDirectSoundBuffer_Release() primary has %d references, "
More information about the wine-cvs
mailing list