From a185b99f12caeab5d853855214bf49d02de47b6d Mon Sep 17 00:00:00 2001 From: Christian Alonso-Daubney Date: Sat, 7 Oct 2023 23:35:28 -0500 Subject: [PATCH] Added pSound check to ma_sound_get_cone() --- miniaudio.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/miniaudio.h b/miniaudio.h index 2fc60a49..8a99faf0 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -76505,6 +76505,10 @@ MA_API void ma_sound_get_cone(const ma_sound* pSound, float* pInnerAngleInRadian *pOuterGain = 0; } + if (pSound == NULL) { + return; + } + ma_spatializer_get_cone(&pSound->engineNode.spatializer, pInnerAngleInRadians, pOuterAngleInRadians, pOuterGain); }