fix crash on SetVolume if instance is NULL

pull/1/head
cosmonaut 2021-10-28 13:25:06 -07:00
parent c486827a36
commit d207d6ca0c
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);
}
}