Changeset 7855 for code/trunk/src/orxonox/sound/SoundManager.cc
- Timestamp:
- Feb 11, 2011, 2:20:13 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/sound/SoundManager.cc
r7284 r7855 70 70 { 71 71 RegisterRootObject(SoundManager); 72 73 this->bDestructorCalled_ = false; 72 74 73 75 // See whether we even want to load … … 163 165 { 164 166 // Erase fade lists because of the smart pointers 167 this->bDestructorCalled_ = true; 165 168 this->fadeInList_.clear(); 166 169 this->fadeOutList_.clear(); … … 343 346 void SoundManager::registerAmbientSound(AmbientSound* newAmbient) 344 347 { 345 if (newAmbient != NULL )348 if (newAmbient != NULL && !this->bDestructorCalled_) 346 349 { 347 350 for (AmbientList::const_iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it) … … 366 369 void SoundManager::unregisterAmbientSound(AmbientSound* oldAmbient) 367 370 { 368 if (oldAmbient == NULL || ambientSounds_.empty() )371 if (oldAmbient == NULL || ambientSounds_.empty() || this->bDestructorCalled_) 369 372 return; 370 373
Note: See TracChangeset
for help on using the changeset viewer.