[Bf-blender-cvs] [e32430d] master: Fix T46458: BGE Crash on load

Campbell Barton noreply at git.blender.org
Mon Oct 12 23:50:11 CEST 2015


Commit: e32430df34b48bfc8b069e48d11589b8a5aabf83
Author: Campbell Barton
Date:   Tue Oct 13 08:43:41 2015 +1100
Branches: master
https://developer.blender.org/rBe32430df34b48bfc8b069e48d11589b8a5aabf83

Fix T46458: BGE Crash on load

regression from 96dd213e7

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

M	source/gameengine/Ketsji/KX_SoundActuator.cpp

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

diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index 02b1071..f6f09dd 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -65,7 +65,7 @@ KX_SoundActuator::KX_SoundActuator(SCA_IObject* gameobj,
 								   KX_SOUNDACT_TYPE type)//,
 								   : SCA_IActuator(gameobj, KX_ACT_SOUND)
 {
-	m_sound = AUD_Sound_copy(sound);
+	m_sound = sound ? AUD_Sound_copy(sound) : NULL;
 	m_handle = NULL;
 	m_volume = volume;
 	m_pitch = pitch;




More information about the Bf-blender-cvs mailing list