[Bf-blender-cvs] [586ec50] master: BGE: Fix T46556: check on null sound datablock pointer.

Porteries Tristan noreply at git.blender.org
Thu Oct 22 20:17:08 CEST 2015


Commit: 586ec500226054252d782d5ce6d3c5e617be5cf8
Author: Porteries Tristan
Date:   Thu Oct 22 20:06:29 2015 +0200
Branches: master
https://developer.blender.org/rB586ec500226054252d782d5ce6d3c5e617be5cf8

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

===================================================================

M	source/gameengine/Converter/KX_ConvertActuators.cpp

===================================================================

diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index c6c36c2..3347255 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -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);




More information about the Bf-blender-cvs mailing list