[Bug 15699] Winecfg crashes if no audio driver is present

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Oct 21 12:08:11 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=15699





--- Comment #1 from Austin English <austinenglish at gmail.com>  2008-10-21 12:08:11 ---
Here's an updated patch, that pops up a messagebox error warning the user that
no audio driver was found:

diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 3ce0e25..b755283 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
 -632,8 +632,13 @@ static void initAudioDlg (HWND hDlg)
      */
     if (buf == NULL)
     {
+
+        /* make sure a driver is available */
+        if (loadedAudioDrv->szDriver == NULL)
+            MessageBox(NULL, "No audio driver available! Check your system
configuration.", "No Audio Driver", MB_OK | MB_ICONERROR);
+
         /* select first available driver */
-        if (*loadedAudioDrv->szDriver)
+        if (loadedAudioDrv->szDriver && *loadedAudioDrv->szDriver)
             selectDriver(hDlg, loadedAudioDrv->szDriver);
     }
     else /* make a local copy of the current registry setting */


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list