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 */
|
||||
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 New Issue