BGE: Fix T46556: check on null sound datablock pointer.

This commit is contained in:
Porteries Tristan 2015-10-22 20:06:29 +02:00
parent ebf197724e
commit 586ec50022
Notes: blender-bot 2023-02-14 09:34:18 +01:00
Referenced by issue #46556, [BUG] BGE Segmentation fault (core dumped)
1 changed files with 1 additions and 1 deletions

View File

@ -421,7 +421,7 @@ void BL_ConvertActuators(const char* maggiename,
soundActuatorType);
// if we made it mono, we have to free it
if(snd_sound != sound->playback_handle && snd_sound != NULL)
if(sound && snd_sound && snd_sound != sound->playback_handle)
AUD_Sound_free(snd_sound);
tmpsoundact->SetName(bact->name);