Commit 269236c1 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

winearts: Don't call arts_free if arts_init wasn't successful.

parent f8cb60f6
......@@ -202,6 +202,7 @@ typedef struct {
ARTS_MSG_RING msgRing;
} WINE_WAVEIN;
static BOOL init;
static WINE_WAVEOUT WOutDev [MAX_WAVEOUTDRV];
static WINE_WAVEIN WInDev [MAX_WAVEINDRV];
......@@ -380,7 +381,8 @@ LONG ARTS_WaveClose(void)
}
}
arts_free(); /* free up arts */
if (init)
arts_free(); /* free up arts */
return 1;
}
......@@ -415,6 +417,8 @@ LONG ARTS_WaveInit(void)
if (ret)
return ret;
init = TRUE;
/* initialize all device handles to -1 */
for (i = 0; i < MAX_WAVEOUTDRV; ++i)
{
......
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