Merge pull request #1127 from Azaezel/alpha41/playAudioCrashfix

fix playAudio crash
This commit is contained in:
Brian Roberts 2023-11-05 15:31:09 -06:00 committed by GitHub
commit a44c57aee4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();