forked from MoonsideGames/FAudioGMS
fix crash on SetVolume if instance is NULL
parent
c486827a36
commit
d207d6ca0c
|
@ -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