Commit 65a1796b authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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
parent 51862d44
......@@ -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)
{
AuCloseServer(AuServ);
AuServ = 0;
if (AuServ)
{
AuCloseServer(AuServ);
AuServ = 0;
}
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment