winenas: fix crash.
- return correct MM error code when no connection to server has been opened - don't close the AU driver if it hasn't been opened
This commit is contained in:
parent
51862d440c
commit
65a1796bc7
|
@ -407,7 +407,7 @@ LONG NAS_WaveClose(void)
|
|||
LONG NAS_WaveInit(void)
|
||||
{
|
||||
int i;
|
||||
nas_init();
|
||||
if (!nas_init()) return MMSYSERR_ERROR;
|
||||
|
||||
/* initialize all device handles to -1 */
|
||||
for (i = 0; i < MAX_WAVEOUTDRV; ++i)
|
||||
|
@ -1475,8 +1475,11 @@ static int nas_close(WINE_WAVEOUT* wwo)
|
|||
|
||||
static int nas_end(void)
|
||||
{
|
||||
if (AuServ)
|
||||
{
|
||||
AuCloseServer(AuServ);
|
||||
AuServ = 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue