Eric Pouech : winenas: fix crash.
Module: wine Branch: refs/heads/master Commit: 65a1796bc7fa1bd136c01222ef58198b4662839a URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=65a1796bc7fa1bd136c01222... Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Thu Dec 8 11:58:35 2005 +0100 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 --- dlls/winmm/winenas/audio.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dlls/winmm/winenas/audio.c b/dlls/winmm/winenas/audio.c index 95be4c3..248a42e 100644 --- a/dlls/winmm/winenas/audio.c +++ b/dlls/winmm/winenas/audio.c @@ -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; }
participants (1)
-
Alexandre Julliard