Commit 2ba20dd7 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

winearts: Try to keep winecfg from crashing by recovering from an arts

library crash.
parent 53496f83
...@@ -3,7 +3,7 @@ TOPOBJDIR = ../../.. ...@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = winearts.drv MODULE = winearts.drv
IMPORTS = winmm user32 kernel32 IMPORTS = winmm user32 kernel32 ntdll
EXTRAINCL = @ARTSINCL@ EXTRAINCL = @ARTSINCL@
EXTRALIBS = @ARTSLIBS@ -ldxguid -luuid EXTRALIBS = @ARTSLIBS@ -ldxguid -luuid
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
#include "dsdriver.h" #include "dsdriver.h"
#include "arts.h" #include "arts.h"
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/exception.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wave); WINE_DEFAULT_DEBUG_CHANNEL(wave);
...@@ -392,14 +393,27 @@ LONG ARTS_WaveInit(void) ...@@ -392,14 +393,27 @@ LONG ARTS_WaveInit(void)
{ {
int i; int i;
int errorcode; int errorcode;
LONG ret = 0;
TRACE("called\n"); TRACE("called\n");
if ((errorcode = ARTS_Init()) < 0) __TRY
{ {
WARN("arts_init() failed (%d)\n", errorcode); if ((errorcode = ARTS_Init()) < 0)
return -1; {
WARN("arts_init() failed (%d)\n", errorcode);
ret = -1;
}
} }
__EXCEPT_PAGE_FAULT
{
ERR("arts_init() crashed\n");
ret = -1;
}
__ENDTRY
if (ret)
return ret;
/* initialize all device handles to -1 */ /* initialize all device handles to -1 */
for (i = 0; i < MAX_WAVEOUTDRV; ++i) 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