fix crash on SetVolume if instance is NULL

mastering_effects
cosmonaut 2021-10-28 13:25:06 -07:00
parent 283d8fc7a8
commit bedd8af2b2
1 changed files with 1 additions and 1 deletions

View File

@ -1101,9 +1101,9 @@ void FAudioGMS_SoundInstance_SetVolume(double soundInstanceID, double volume)
RETURN_ON_NULL_DEVICE()
FAudioGMS_SoundInstance* instance = FAudioGMS_INTERNAL_LookupSoundInstance((uint32_t)soundInstanceID);
instance->adjustingVolumeOverTime = 0; /* override volume adjustment over time */
if (instance != NULL)
{
instance->adjustingVolumeOverTime = 0; /* override volume adjustment over time */
FAudioGMS_INTERNAL_SoundInstance_SetVolume(instance, volume);
}
}