Fix a possible null pointer dereference.

This commit is contained in:
David Reid
2026-01-07 12:07:25 +10:00
parent d791c16d8d
commit bd26454c26
+5 -2
View File
@@ -52305,13 +52305,16 @@ static float ma_calculate_angular_gain(ma_vec3f dirA, ma_vec3f dirB, float coneI
MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer, ma_spatializer_listener* pListener, void* pFramesOut, const void* pFramesIn, ma_uint64 frameCount)
{
ma_channel* pChannelMapIn = pSpatializer->pChannelMapIn;
ma_channel* pChannelMapOut = pListener->config.pChannelMapOut;
ma_channel* pChannelMapIn;
ma_channel* pChannelMapOut;
if (pSpatializer == NULL) {
return MA_INVALID_ARGS;
}
pChannelMapIn = pSpatializer->pChannelMapIn;
pChannelMapOut = pListener->config.pChannelMapOut;
/* If we're not spatializing we need to run an optimized path. */
if (ma_atomic_load_i32(&pSpatializer->attenuationModel) == ma_attenuation_model_none) {
if (ma_spatializer_listener_is_enabled(pListener)) {