forked from MoonsideGames/FAudioGMS
fix crash on SetVolume if instance is NULL
parent
283d8fc7a8
commit
bedd8af2b2
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue