crashfix for SFXEmitter

the last refactor broke spawning sfxemitters with blank entries. this will fix that, though we'll need to circle back and correct other issues, like looping override
This commit is contained in:
AzaezelX 2026-06-18 17:17:07 -05:00
parent 280866724d
commit 6a448cf118

View file

@ -820,7 +820,7 @@ void SFXEmitter::_update()
// is toggled on a local profile sound. It makes the
// editor feel responsive and that things are working.
if( gEditingMission &&
(SoundAsset::getAssetErrCode(mSoundAsset) || !mSoundAsset->getSFXTrack()) &&
(SoundAsset::getAssetErrCode(mSoundAsset) || (mSoundAsset.isValid() && !mSoundAsset->getSFXTrack())) &&
mPlayOnAdd &&
mDirty.test( IsLooping ) )
prevState = SFXStatusPlaying;