mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
fix updateAudioState null crash
This commit is contained in:
parent
4f0f97c5e7
commit
155477492d
1 changed files with 6 additions and 3 deletions
|
|
@ -2303,9 +2303,12 @@ void ShapeBase::updateAudioState(SoundThread& st)
|
||||||
// if asset is valid, play
|
// if asset is valid, play
|
||||||
if (st.asset->isAssetValid() )
|
if (st.asset->isAssetValid() )
|
||||||
{
|
{
|
||||||
st.sound = SFX->createSource( st.asset->getSFXTrack() , &getTransform() );
|
if (st.asset->load() == AssetBase::Ok)
|
||||||
if ( st.sound )
|
{
|
||||||
st.sound->play();
|
st.sound = SFX->createSource(st.asset->getSFXTrack(), &getTransform());
|
||||||
|
if (st.sound)
|
||||||
|
st.sound->play();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
st.play = false;
|
st.play = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue