fix playAudio crash

This commit is contained in:
AzaezelX 2023-11-05 15:30:19 -06:00
parent edbb76155b
commit 12d0688abd

View file

@ -2301,8 +2301,9 @@ void ShapeBase::updateAudioState(SoundThread& st)
if ( isGhost() ) if ( isGhost() )
{ {
// if asset is valid, play // if asset is valid, play
if (st.asset->isAssetValid() ) if (st.asset.notNull())
{ {
st.asset->loadSound();
st.sound = SFX->createSource( st.asset->getSFXTrack() , &getTransform() ); st.sound = SFX->createSource( st.asset->getSFXTrack() , &getTransform() );
if ( st.sound ) if ( st.sound )
st.sound->play(); st.sound->play();