Minor engine lifetime fix

This commit is contained in:
Jack Andersen 2016-05-31 11:40:24 -10:00
parent b26ad4c446
commit 56f1bf7bff
1 changed files with 3 additions and 2 deletions

View File

@ -13,8 +13,9 @@ namespace amuse
Engine::~Engine()
{
while (m_activeSequencers.size())
m_activeSequencers.front()->_destroy();
for (std::shared_ptr<Sequencer>& seq : m_activeSequencers)
if (!seq->m_destroyed)
seq->_destroy();
while (m_activeSubmixes.size())
removeSubmix(&m_activeSubmixes.front());
for (std::shared_ptr<Emitter>& emitter : m_activeEmitters)