From 61393fa021f271a7751aee41260f63a501443854 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 17 Oct 2009 17:21:00 +0200 Subject: [PATCH] dsound: Check for NULL listener (Coverity). --- dlls/dsound/tests/ds3d8.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c index 9dfdd31bbdc..8ad428d3edc 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, " -- 2.11.4.GIT