mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-09 21:54:35 +00:00
Merge pull request #594 from LuisAntonRebollo/unit-tests-without-crash
Increased stability Torque3D: unit-tests running without a crash.
This commit is contained in:
commit
feec36731e
18 changed files with 113 additions and 19 deletions
|
|
@ -434,7 +434,7 @@ class SFXSource : public SimGroup
|
|||
virtual bool isVirtualized() const { return false; }
|
||||
|
||||
/// Returns true if this is a looping source.
|
||||
bool isLooping() const { return mDescription->mIsLooping; }
|
||||
bool isLooping() const { return mDescription.isValid() && mDescription->mIsLooping; }
|
||||
|
||||
/// @}
|
||||
|
||||
|
|
|
|||
|
|
@ -686,7 +686,8 @@ void SFXSystem::_onRemoveSource( SFXSource* source )
|
|||
if( dynamic_cast< SFXSound* >( source ) )
|
||||
{
|
||||
SFXSoundVector::iterator iter = find( mSounds.begin(), mSounds.end(), static_cast< SFXSound* >( source ) );
|
||||
mSounds.erase_fast( iter );
|
||||
if( iter != mSounds.end() )
|
||||
mSounds.erase_fast( iter );
|
||||
|
||||
mStatNumSounds = mSounds.size();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue