Fix T46458: BGE Crash on load
authorCampbell Barton <ideasman42@gmail.com>
Mon, 12 Oct 2015 21:43:41 +0000 (08:43 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 12 Oct 2015 21:43:41 +0000 (08:43 +1100)
regression from 96dd213e7

source/gameengine/Ketsji/KX_SoundActuator.cpp

index 02b1071e267b46b5a00721dd0b7c829ac5999379..f6f09dd3bdaae6b698c452b2215a18c9c395f903 100644 (file)
@@ -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;