From 58f34f509b926619a512025e89b7299fe8a2d038 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Fri, 28 Sep 2012 08:59:36 +0200 Subject: [PATCH] dmusic: Check returned value of GetPortCaps. --- dlls/dmusic/dmusic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 2977cd9675b..11968edebef 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -395,10 +395,8 @@ static void create_system_ports_list(IDirectMusic8Impl* object) hr = IDirectMusicSynth8_GetPortCaps(synth, &port->caps); IDirectMusicSynth8_Release(synth); } - else - { + if (FAILED(hr)) nb_ports--; - } object->nb_system_ports = nb_ports; }