From 0ba38df7fa2c2260ba220cad723b480561eab5df Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Mon, 8 Jun 2009 22:02:46 +0000 Subject: [PATCH] - Store servicegroup obtained from IMiniportDMus / IMiniportMidi Init function when IPortDMus / IPortMidi RegisterServiceGroup is not called svn path=/trunk/; revision=41353 --- reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c b/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c index 33d9feb6c39..5e37ef0c68c 100644 --- a/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c +++ b/reactos/drivers/wdm/audio/backpln/portcls/port_dmus.c @@ -164,7 +164,7 @@ IPortDMus_fnInit( IMiniportDMus * Miniport = NULL; IMiniportMidi * MidiMiniport = NULL; NTSTATUS Status; - PSERVICEGROUP ServiceGroup; + PSERVICEGROUP ServiceGroup = NULL; PPINCOUNT PinCount; PPOWERNOTIFY PowerNotify; IPortDMusImpl * This = (IPortDMusImpl*)iface; @@ -263,8 +263,11 @@ IPortDMus_fnInit( return Status; } - ASSERT(This->ServiceGroup); - ASSERT(ServiceGroup == This->ServiceGroup); + if (This->ServiceGroup == NULL && ServiceGroup) + { + /* register service group */ + This->ServiceGroup = ServiceGroup; + } /* Initialize port object */ This->pMiniport = Miniport;