mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Fix a null pointer dereference.
This commit is contained in:
+1
-1
@@ -10531,7 +10531,7 @@ BOOL CALLBACK ma_context_get_device_info_callback__dsound(LPGUID lpGuid, LPCSTR
|
||||
return FALSE; /* Stop enumeration. */
|
||||
} else {
|
||||
/* Not the default device. */
|
||||
if (lpGuid != NULL) {
|
||||
if (lpGuid != NULL && pData->pDeviceID != NULL) {
|
||||
if (memcmp(pData->pDeviceID->dsound, lpGuid, sizeof(pData->pDeviceID->dsound)) == 0) {
|
||||
ma_strncpy_s(pData->pDeviceInfo->name, sizeof(pData->pDeviceInfo->name), lpcstrDescription, (size_t)-1);
|
||||
pData->found = MA_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user