mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-19 14:43:47 +00:00
fix playAudio crash
This commit is contained in:
parent
edbb76155b
commit
12d0688abd
1 changed files with 2 additions and 1 deletions
|
|
@ -2301,8 +2301,9 @@ void ShapeBase::updateAudioState(SoundThread& st)
|
|||
if ( isGhost() )
|
||||
{
|
||||
// if asset is valid, play
|
||||
if (st.asset->isAssetValid() )
|
||||
if (st.asset.notNull())
|
||||
{
|
||||
st.asset->loadSound();
|
||||
st.sound = SFX->createSource( st.asset->getSFXTrack() , &getTransform() );
|
||||
if ( st.sound )
|
||||
st.sound->play();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue