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

Alexandre Julliard julliard at wine.codeweavers.com
Thu Apr 6 05:52:47 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 269236c1c8dfba76c5b83de92f927decb1cb2390
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=269236c1c8dfba76c5b83de92f927decb1cb2390

Author: Robert Reif <reif at earthlink.net>
Date:   Wed Apr  5 19:14:32 2006 -0400

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

---

 dlls/winmm/winearts/audio.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/winmm/winearts/audio.c b/dlls/winmm/winearts/audio.c
index 9b5c10b..7a38c2e 100644
--- a/dlls/winmm/winearts/audio.c
+++ b/dlls/winmm/winearts/audio.c
@@ -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)
     {




More information about the wine-cvs mailing list