mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 04:20:56 +00:00
winecfg: Fix audio crash when no drivers are available.
This commit is contained in:
parent
b4a5df1c19
commit
6f4e208321
|
@ -519,8 +519,13 @@ static void findAudioDrivers(void)
|
|||
SetCursor(old_cursor);
|
||||
|
||||
/* terminate list with empty driver */
|
||||
loadedAudioDrv = HeapReAlloc(GetProcessHeap(), 0, loadedAudioDrv, (numFound + 1) * sizeof(AUDIO_DRIVER));
|
||||
CopyMemory(&loadedAudioDrv[numFound], pAudioDrv, sizeof(AUDIO_DRIVER));
|
||||
if (numFound) {
|
||||
loadedAudioDrv = HeapReAlloc(GetProcessHeap(), 0, loadedAudioDrv, (numFound + 1) * sizeof(AUDIO_DRIVER));
|
||||
CopyMemory(&loadedAudioDrv[numFound], pAudioDrv, sizeof(AUDIO_DRIVER));
|
||||
} else {
|
||||
loadedAudioDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(AUDIO_DRIVER));
|
||||
ZeroMemory(&loadedAudioDrv[0], sizeof(AUDIO_DRIVER));
|
||||
}
|
||||
}
|
||||
|
||||
/* check local copy of registry string for unloadable drivers */
|
||||
|
|
Loading…
Reference in a new issue